Ezio Melotti <ezio.melo...@gmail.com> added the comment:

Your file is named 'http.py'. When urllib.request tries to import
http.client your file ("D:\program\python\http.py") is picked up first
instead of the right one ('C:\Program Files\Python311\lib\http\client.py').
Your file is then executed again and when it calls urllib.request,
urllib has not been completely imported yet, so the call fails.
Try to use another name for your program.

----------
nosy: +ezio.melotti
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: compile error -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7121>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to