You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm having problem with running pygooglenews.
My error result as follows:
Traceback (most recent call last):
File "C:\pygooglenews.py", line 1, in
from pygooglenews import GoogleNews
ImportError: cannot import name 'GoogleNews' from partially initialized module 'pygooglenews' (most likely due to a circular import) (C:\pygooglenews.py)
Here's my code :
from pygooglenews import GoogleNews
gn = GoogleNews()
search = gn.search('lockdown')
print(search)
The text was updated successfully, but these errors were encountered:
Be careful when naming the filenames - Python takes them into account too.
pygooglenews.py has the exact same name with the module you're trying to import the class from. (pygooglenews), this confuses the interpreter, which makes it import GoogleNews from your file.
It is recommended that you rename pygooglenews.py to something like app.py to avoid future problems.
Hello, I'm having problem with running pygooglenews.
My error result as follows:
Traceback (most recent call last):
File "C:\pygooglenews.py", line 1, in
from pygooglenews import GoogleNews
ImportError: cannot import name 'GoogleNews' from partially initialized module 'pygooglenews' (most likely due to a circular import) (C:\pygooglenews.py)
Here's my code :
from pygooglenews import GoogleNews
gn = GoogleNews()
search = gn.search('lockdown')
print(search)
The text was updated successfully, but these errors were encountered: