Ezio Melotti 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
New submission from mike :
There's a python program in the attached file http.py, I import
urllib.request in http.py, and urllib.request imports http.client.
When I try to run http.py by command "python http.py", the error is as
below:
Traceback (most recent call last):
File "http.py", line