Answer the question
In order to leave comments, you need to log in
Python: can't open file [errno 2] no such file or directory how to solve?
Code in file
import requests
url = " https://www.google.com/ "
response = requests.get(url)
print(f"Requests to {url}. Status code is {response.status_code}")
How to solve this problem?
Answer the question
In order to leave comments, you need to log in
I had the same problem. And it consisted in the fact that I saved the python file in the wrong folder.
Just carefully review the location of the file that cannot be opened. Good luck!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question