Sep-10-2020, 02:06 PM
hi,
I pip installed requests module and added it to my pydev path in my eclipse project. But when i run the program, I get the following error. Please help !
I pip installed requests module and added it to my pydev path in my eclipse project. But when i run the program, I get the following error. Please help !
import requests r = requests.get( 'https://xkcd.com/' ) print( r )
Error:Traceback (most recent call last):
File "/Users/apple/eclipse-workspace/test_demo/test_package/sqlite_requests.py", line 28, in <module>
import requests
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/__init__.py", line 7, in <module>
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py", line 3, in <module>
import logging
File "/Users/apple/eclipse-workspace/test_demo/test_package/logging.py", line 8, in <module>
logging.basicConfig( filename = 'sample.log' , level = logging.DEBUG, format = '%(asctime)s:%(name)s:%(message)s' )
AttributeError: partially initialized module 'logging' has no attribute 'basicConfig' (most likely due to a circular import)