Quote:
Originally Posted by QBit99
I sent a 15 Mb book earlier today. It says fetch successful on the kindle but the book ain't showing up in the Downloads folder. I look into the log file and i'm getting this:
** 2022-05-15 13:52:51 **
Traceback (most recent call last):
File "/mnt/us/extensions/MailPushRU-1.2-RU/src/mailpush.py", line 22, in <module>
files = fetch_files(**config)
File "/mnt/us/extensions/MailPushRU-1.2-RU/src/fetchfiles.py", line 93, in fetch_files
msg = email.message_from_bytes(msg_data[0][1])
File "/mnt/us/python3/lib/python3.9/email/__init__.py", line 46, in message_from_bytes
return BytesParser(*args, **kws).parsebytes(s)
File "/mnt/us/python3/lib/python3.9/email/parser.py", line 123, in parsebytes
return self.parser.parsestr(text, headersonly)
File "/mnt/us/python3/lib/python3.9/email/parser.py", line 67, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
File "/mnt/us/python3/lib/python3.9/email/parser.py", line 56, in parse
feedparser.feed(data)
File "/mnt/us/python3/lib/python3.9/email/feedparser.py", line 176, in feed
self._call_parse()
File "/mnt/us/python3/lib/python3.9/email/feedparser.py", line 180, in _call_parse
self._parse()
File "/mnt/us/python3/lib/python3.9/email/feedparser.py", line 385, in _parsegen
for retval in self._parsegen():
File "/mnt/us/python3/lib/python3.9/email/feedparser.py", line 469, in _parsegen
self._cur.set_payload(EMPTYSTRING.join(lines))
MemoryError
I have absolutely no clue what to do next
|
It looks like the Kindle has run out of its memory. This is not a bug, but the hardware limit has been reached.
If you fetched multiple emails at once or attached multiple files to one email, you can send them separately. And in this case, I can optimize the code (release memory more diligently) to relieve memory pressure. So, please let me know.
If not, you can send large file by download link instead of attaching it. This approach avoids reading the file at once into memory but download it in chunks.