Cannot import urllib.request and urllib.parse

I would be grateful for any help. I am using Python 3.4.1 and I am trying to import urllib.request and urllib.parse. To no avail. I always get:

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 2218, in _find_and_load_unlocked
AttributeError: 'module' object has no attribute '__path__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/x/Documents/PROGRAMING and MODELING/Phyton/find cure words/importowanie.py", line 1, in <module>
    import urllib.parse
  File "C:/Users/x/Documents/PROGRAMING and MODELING/Phyton/find cure words\urllib.py", line 1, in <module>
    import urllib.request
ImportError: No module named 'urllib.request'; 'urllib' is not a package

I think the problem is with import, but I don’t know how to get around it.

+4
source share
2 answers

Without actual code, I guess based on my past experience with such an error.

, urllib.parse importowanie.py C:/Users/x/Documents/PROGRAMING and MODELING/Phyton/find cure words. Python urllib, , . , urllib , . "" urllib. parse urllib, . - urllib.py C:/Users/x/Documents/PROGRAMING and MODELING/Phyton/find cure words.

, urllib - .

+10
0

Source: https://habr.com/ru/post/1543822/


All Articles