Error if filename includes (1) after issue# under certain cases

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
TheHYPO
Posts: 5
Joined: Tue Nov 28, 2023 11:09 pm

Error if filename includes (1) after issue# under certain cases

Post by TheHYPO »

Bug report: I've noticed that if I have a certain file that has downloaded with the common Windows dupe addition "(1)" at the end of the filename, it breaks the Mylar page for the Series with the following error:

Code: Select all

500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/cherrypy/_cprequest.py", line 638, in respond
    self._do_respond(path_info)
  File "/lsiopy/lib/python3.11/site-packages/cherrypy/_cprequest.py", line 697, in _do_respond
    response.body = self.handler()
                    ^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/cherrypy/lib/encoding.py", line 223, in __call__
    self.body = self.oldhandler(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mylar3/mylar/webserve.py", line 396, in comicDetails
    updater.forceRescan(ComicID)
  File "/app/mylar3/mylar/updater.py", line 1367, in forceRescan
    fcdigit = helpers.issuedigits(temploc)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mylar3/mylar/helpers.py", line 1107, in issuedigits
    decisval = int(decis)
               ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '(1'
This is not universal. Trial and error seems to limit this to instances where the filename has an issue number with a "#" before it, and the (1) (or any other number in a bracket) is immediately after the issue number without a space, such as "The Amazing Spider-Man #631(1).cbz". It happens whether there is something else after the (1) or not. It does not happen if there is a space.

This is version: v0.7.8 (master) via docker on linux. There is no log entry produced that I can see.
Post Reply