Error when navigate to the Wanted page

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
User avatar
breaker
Posts: 3
Joined: Sat Mar 01, 2014 12:40 am

Error when navigate to the Wanted page

Post by breaker »

Whenever I click on the Wanted page, or browse manually to /upcoming, I get this error:
500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "C:\mylar\cherrypy\_cprequest.py", line 645, in respond
response.body = self.handler()
File "C:\mylar\cherrypy\lib\encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "C:\mylar\cherrypy\_cpdispatch.py", line 29, in __call__
return self.callable(*self.args, **self.kwargs)
File "C:\mylar\mylar\webserve.py", line 977, in upcoming
if len(upc['IssueDate']) <= 7 :
TypeError: object of type 'NoneType' has no len()
I'm on build 436edde0e338cf0f8716a5dbf12b01a0beb62d0f currently.

There doesn't appear to be anything corresponding in the mylar.log file.

I start Mylar with a Powershell script so that the Python console window is hidden - I noticed another thread that mentioned some print statements that might be causing a faintly similar issue, but I get the same thing if I start Mylar in a regular Python console session.

This behaviour has been going on for several updates now, and I've even tried a clean install, but it's persisted.

Any ideas?
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Error when navigate to the Wanted page

Post by evilhero »

Of course I have some ideas.. Just a matter of finding the right solution :)

So the error is probably due to the fact that you have a series in your watchlist with a Null vale for the date, which is what Mylar is indicating.

You can try to solve it in two ways.

1- Navigate to the Manage tab and in the upper right you'll see a button labeled Manage Comics. Load it and you'll see all your comics listed, anything that has a null date value or None or has an error, delete the series (you can readd it afterwards). Once you delete the bad ones try going back to the Upcoming page and seeing what happens.

2- do a mass db update. In the Manage tab/advanced options, you'll see an option to Refresh all active series.. It will do a Refresh for every comic in your watchlist. Try not to do anything while it's running and once it's completed it should fix the error with whatever series you have (the Refresh deletes all issue data for the series, and then reloads fresh data from comicvine to ensure things are up to date).

Try one of those (or both), and let me know. If you're still having problems, it may be a config.ini problem.
User avatar
breaker
Posts: 3
Joined: Sat Mar 01, 2014 12:40 am

Re: Error when navigate to the Wanted page

Post by breaker »

OK, tried both of those:

1) Red Lanterns (don't hate me!) was displaying as Loading in the Status field but no series had a missing or odd-looking value in either the LastIssue or Updated fields. I removed Red Lanterns, restarted - but still get the same error when going to /upcoming.

2) Tried this - not sure how long it should take - I gave it an hour, then restarted - again, still get the error.

You mentioned config.ini as somewhere else to look - want me to post the contents here (minus provider apikeys, passwords, etc, obviously)?

Thanks for the prompt response - much appreciated!
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Error when navigate to the Wanted page

Post by evilhero »

breaker wrote:OK, tried both of those:

1) Red Lanterns (don't hate me!) was displaying as Loading in the Status field but no series had a missing or odd-looking value in either the LastIssue or Updated fields. I removed Red Lanterns, restarted - but still get the same error when going to /upcoming.
Hah - I've been meaning to start reading the Lanterns, but there's so many comics it seems and just not enough free time to read them all (not hating!).
breaker wrote:2) Tried this - not sure how long it should take - I gave it an hour, then restarted - again, still get the error.
It really depends on how many series you have in your watchlist, and how many issues each one has (as it has to load in all the data - a series of 300+ issues could take a couple mins, the 2000AD series would take alot longer since it has like 1800+ issues). Generally each series should take at most 20s on average and that's being overly generous with the time, so the [ # of series you have in your watchlist / 3 ] will give you how many minutes it 'should' take (in theory).
breaker wrote:You mentioned config.ini as somewhere else to look - want me to post the contents here (minus provider apikeys, passwords, etc, obviously)?
You can post the config.ini, or mail me via the forum here is ok as well. If all else fails, you could mail me your mylar.db file as well - it doesn't hold any api keys or anything of the sort, just the info, so I could load it and see if I can duplicate the error(s) you're getting in an attempt to better understand what's going on, and ultimately fix them :)
User avatar
breaker
Posts: 3
Joined: Sat Mar 01, 2014 12:40 am

Re: Error when navigate to the Wanted page

Post by breaker »

Config.ini is here, will mail you a copy of my mylar.db if you like. Sorry for the delay - life gets in the way sometimes, doesn't it?
[General]
config_version = 5
http_port = 8090
http_host = 0.0.0.0
http_username = user
http_password = pass
http_root = /
api_enabled = 0
api_key = ""
launch_browser = 0
log_dir = C:\mylar\logs
logverbose = 0
git_path = ""
cache_dir = C:\mylar\cache
annuals_on = 0
cv_only = 1
cv_onetimer = 0
cvapifix = 0
check_github = 1
check_github_on_startup = 1
check_github_interval = 360
destination_dir = N:\comics
chmod_dir = 0777
chmod_file = 0660
usenet_retention = 1500
search_interval = 360
nzb_startup_search = 1
libraryscan = 0
libraryscan_interval = 1440
add_comics = 1
comic_dir = n:\comics
imp_move = 0
imp_rename = 0
imp_metadata = 0
download_scan_interval = 1440
check_folder = ""
interface = default
autowant_all = 0
autowant_upcoming = 1
preferred_quality = 0
comic_cover_local = 0
correct_metadata = 0
move_files = 0
rename_files = 0
folder_format = $Publisher/$Series ($Year)
file_format = $Series $Issue ($Year)
blackhole_dir = ""
replace_spaces = 0
replace_char = .
zero_level = 0
zero_level_n = none
lowercase_filenames = 0
ignore_havetotal = 0
syno_fix = 0
search_delay = 1
grabbag_dir = s:\torrent\Mylar
highcount = 0
read2filename = 0
storyarcdir = 0
use_minsize = 0
minsize = ""
use_maxsize = 0
maxsize = ""
add_to_csv = 1
cvinfo = 0
log_level = 0
enable_extra_scripts = 0
extra_scripts = ""
enable_pre_scripts = 0
pre_scripts = ""
post_processing = 1
weekfolder = 0
locmove = 0
newcom_dir = ""
fftonewcom_dir = 0
enable_meta = 0
cmtagger_path = ""
indie_pub = 75
biggie_pub = 55
enable_rss = 1
rss_checkinterval = 20
rss_lastrun = 2014-03-03 23:01:01
provider_order = 0, nzbsu, 1, Experimental, 2, https://01100111011001010110010101101011.info
nzb_downloader = 0
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Error when navigate to the Wanted page

Post by evilhero »

Life always gets in the way - that's what makes everything else interesting :)

So I checked out your .db file (sooo much easier than troubleshooting), and found the error. It was actually a series that you were watching at one point it looks like (Avengers Academy), and then got deleted - or maybe you one-offed an issue from the pull-list (not sure as there's no indication exactly). But the problem was that the .db file contained an entry in your upcoming table that contained only a comicid and a status, no other data (no issue #, no comic name, no issue date), and because it didn't have those values it got passed through and errored out when it was trying to take the value of the issue date.

So, instead of me just deleting the entry from your .db and mailing it back, I modified the sql statement that loads up the Upcoming tab to be a bit more strict in what it's calling up - as soon as I did that, and ran it against your db, it loaded with no problems.

I'll commit the fix for this up tonight - so stay tuned :)
Post Reply