Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recently (without change in my code) I have the following error: RecursionError: maximum recursion depth exceeded while calling a Python object #89

Open
deathnote2501 opened this issue Mar 15, 2023 · 1 comment

Comments

@deathnote2501
Copy link

Hi guys :)

Recently I have this problem (without changing my code):

My code is:

from simplegmail import Gmail
gmail = Gmail()
messages = gmail.get_unread_inbox()

for message in messages:
    print(message)

The console error is:

/home/jerome/.local/lib/python3.10/site-packages/bs4/builder/init.py:545: XMLParsedAsHTMLWarning: It looks like you're parsing an XML document using an HTML parser. If this really is an HTML document (maybe it's XHTML?), you can ignore or filter this warning. If it's XML, you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the lxml package installed, and pass the keyword argument features="xml" into the BeautifulSoup constructor.
warnings.warn(
/home/jerome/.local/lib/python3.10/site-packages/dateutil/parser/_parser.py:1207: UnknownTimezoneWarning: tzname PDT identified but not understood. Pass tzinfos argument in order to correctly return a timezone-aware datetime. In a future version, this will raise an exception.
warnings.warn("tzname {tzname} identified but not understood. "

It launches 17 threads and after 1 minute I have many lines as:

File "/home/jerome/.local/lib/python3.10/site-packages/bs4/element.py", line 1718, in decode
contents = self.decode_contents(
File "/home/jerome/.local/lib/python3.10/site-packages/bs4/element.py", line 1815, in decode_contents
s.append(c.decode(indent_level, eventual_encoding,

At the end after 2-3 minutes, I have:

TypeError: can only concatenate list (not "NoneType") to list

I tried on pycharm and vs code to avoid environment issues.

Thanks

@jeremyephron
Copy link
Owner

Hi can you please:

  • Post the full terminal output (these logs are not complete)
  • Run gmail.get_messages(query="...") with a query for specific messages to isolate which message is causing the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants