jeremyephron / simplegmail

A simple Gmail API client for applications in Python
MIT License
336 stars 73 forks source link

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 1 year ago

deathnote2501 commented 1 year ago

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 commented 1 year ago

Hi can you please: