#1138607 mnemosyne: urllib.error.HTTPError on HTTP 500

#1138607#5
Date:
2026-06-01 03:44:55 UTC
From:
To:
Dear Maintainer,

attempting to run mnemosyne today resulted in

Uploading [some bz2 file] ... upload [some
path]/.local/share/mnemosyne/history/[filename].bz2
Upload failed
HTTP Error 500: Internal Server Error

Traceback (innermost last):
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/log_uploader.py",
line 87, in run
    self.upload(filename)
    ~~~~~~~~~~~^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/log_uploader.py",
line 59, in upload
    response = urllib.request.urlopen(req)
  File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen
    return opener.open(url, data, timeout)
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/urllib/request.py", line 495, in open
    response = meth(req, response)
  File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response
    response = self.parent.error(
        'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.13/urllib/request.py", line 533, in error
    return self._call_chain(*args)
           ~~~~~~~~~~~~~~~~^^^^^^^
  File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
 urllib.error.HTTPError: HTTP Error 500: Internal Server Error

ICE default IO error handler doing an exit(), pid = 8494, errno = 32
QThreadStorage: entry 3 destroyed before end of thread 0x3d266f10
QThreadStorage: entry 2 destroyed before end of thread 0x3d266f10
QThreadStorage: entry 1 destroyed before end of thread 0x3d266f10

[4]+  Exit 1                     mnemosyne

Now i'm guessing that the 'exit' part is unrelated due to another bug the bug
I'm reporting here is that in the event that the statistics server fails (ie
log_uploader.py fails to upload to it) an ugly stack frame results.
This exception
should be caught and handled earlier, probably in log_uploader.py itself
with a message that explains that the problem is on the other end
(internal server error)