Hello! I'm in desperate need of help.
I'm attempting to run the following code:
Can someone please tell me why this is happening and how to fix it? I've been doing pretty well with the lessons up till now but can't complete any exercises or examples until I get this figured out.
Thank you in advance!
I'm attempting to run the following code:
import urllib.request, urllib.parse, urllib.error fhand = urllib.request.urlopen('http.//data.pr4.org/romeo.txt') for line in fhand: print(line.decode().strip())and come up with the following:
Error: File "libby.py", line 1, in <module>
import urllib.request, urllib.parse, urllib.error
File "/Users/claudiachopek/Desktop/py4e/urllib.py", line 1, in <module>
import urllib.request, urllib.parse, urllib.error
ModuleNotFoundError: No module named 'urllib.request'; 'urllib' is not a package
If it's of any help, I'm running Python 3.8.5 on Mac OS Catalina 10.15.5Can someone please tell me why this is happening and how to fix it? I've been doing pretty well with the lessons up till now but can't complete any exercises or examples until I get this figured out.
Thank you in advance!