Closed ghost closed 7 years ago
Yep that can be fixed - just so I'm sure, you're doing an import of a series that's bombing out during the actual import portion (not the scanning)? Which series are you trying to import so I can make sure to test the fix against the problematic one.?
Quite a few series, actually. It occurs when I'm importing, and when it automatically finds the series: The below results in the 500 error. That is after clicking on "import".
http://localhost:8090/preSearchit?ComicName=Action%20Comics
Here is another example:
Confirming Wonder Woman:
http://localhost:8090/confirmResult?comicname=Wonder%20Woman&comicid=42953
Selecting:
http://localhost:8090/addComic?comicid=42953&comicname=Wonder+Woman&comicyear=2011&comicpublisher=DC%20Comics&comicimage=cache/blankcover.jpg&comicissues=29&imported=confirm&ogcname=42953
Finally, clicking import:
http://localhost:8090/preSearchit?ComicName=Wonder%20Woman
Leads to:
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
File "/Applications/git/mylar/cherrypy/_cprequest.py", line 645, in respond
response.body = self.handler()
File "/Applications/git/mylar/cherrypy/lib/encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/Applications/git/mylar/cherrypy/_cpdispatch.py", line 29, in __call__
return self.callable(*self.args, **self.kwargs)
File "/Applications/git/mylar/mylar/webserve.py", line 1826, in preSearchit
mylar.moveit.movefiles(movedata_comicid, movedata_comiclocation, movedata_comicname)
File "/Applications/git/mylar/mylar/moveit.py", line 24, in movefiles
renameit = helpers.rename_param(comicid, impr['ComicName'], orig_iss, orig_filename)
File "/Applications/git/mylar/mylar/helpers.py", line 269, in rename_param
chkissue = myDB.action("SELECT * from issues WHERE ComicID=? AND Issue_Number=?", [comicid, int(issue)]).fetchone()
ValueError: invalid literal for int() with base 10: '023.2'
Powered by CherryPy 3.2.0
Let me know if you need more examples, I've got about 20 series that I can't import due to this issue. Scanning works fine.
That should be more than helpful showing the work flow. From what I can see briefly, It should just be a matter of converting the issue to an integer (which Mylar already has a field for so that alphanumerics are taken care of properly) and then feeding it back.
I'll take a look at this tomorrow since I'll have some time to devote to it, and I'll see how far I can get (I'm going to have to rewrite alot of the code or reuse functions, which is fine, as it needed to get done anyways).
Delayed response - but I was able to work abit on the importer tonight and while I'm not happy with the parser and the logistics in the module itself (it was done along time ago), it's working for the series that have a decimal issue and the filename has the same (as in your example).
I'm going to do a rewrite of the importer at some point, and add in some other options behind the scenes that will improve the matching algorithms as well as tidying up alot of the code.
You can expect the fix for this issue (the decimal issue with the importer) to be committed to the development branch this Thursday (yes, I have it on my calendar). :)
Seems to still be occurring: Importing 'Action Comics': http://127.0.0.1:8090/preSearchit?ComicName=Action%20Comics
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
File "/Applications/git/mylar/cherrypy/_cprequest.py", line 645, in respond
response.body = self.handler()
File "/Applications/git/mylar/cherrypy/lib/encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/Applications/git/mylar/cherrypy/_cpdispatch.py", line 29, in __call__
return self.callable(*self.args, **self.kwargs)
File "/Applications/git/mylar/mylar/webserve.py", line 1907, in preSearchit
if int(getiss) > int(minISSUE):
ValueError: invalid literal for int() with base 10: '023.2'
Ok, that's the same error but in a different module - so it's actually gotten farther than previously. I've fixed it on my local install, and ran it against the same series you tested with (Wonder Woman) until it worked - and now it works ;)
Will be in next development commit, which will be up shortly.
Still getting the 500 server error, but not due to the integer:
http://127.0.0.1:8090/preSearchit?ComicName=Locke%20Key%20Grindhouse
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
File "/Applications/git/mylar/cherrypy/_cprequest.py", line 645, in respond
response.body = self.handler()
File "/Applications/git/mylar/cherrypy/lib/encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/Applications/git/mylar/cherrypy/_cpdispatch.py", line 29, in __call__
return self.callable(*self.args, **self.kwargs)
File "/Applications/git/mylar/mylar/webserve.py", line 1924, in preSearchit
mylar.moveit.movefiles(movedata_comicid, movedata_comiclocation, movedata_comicname)
File "/Applications/git/mylar/mylar/moveit.py", line 25, in movefiles
nfilename = renameit['nfilename']
TypeError: 'NoneType' object has no attribute '__getitem__'
Powered by CherryPy 3.2.0
And one more (integer): http://127.0.0.1:8090/preSearchit?ComicName=Ultimate%20Spider%20Man
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
File "/Applications/git/mylar/cherrypy/_cprequest.py", line 645, in respond
response.body = self.handler()
File "/Applications/git/mylar/cherrypy/lib/encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/Applications/git/mylar/cherrypy/_cpdispatch.py", line 29, in __call__
return self.callable(*self.args, **self.kwargs)
File "/Applications/git/mylar/mylar/webserve.py", line 1940, in preSearchit
numissues = int(minISSUE) - int(startISSUE)
ValueError: invalid literal for int() with base 10: '000.5'
Powered by CherryPy 3.2.0
Figures the. 5 issue... Decimal issue again, but different portion of code. I'll look into this and see what's going on...
Is this still an issue ? I think I had this working awhile ago, but can't recall if the commit went up or it was in the stages that I lost a few months ago.
Any way to fix the int issue with decimal issue numbers?