evilhero / mylar

An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents
GNU General Public License v3.0
975 stars 172 forks source link

Fail to Start After Update #920

Closed mzrpivwr closed 9 years ago

mzrpivwr commented 9 years ago

Hi,

I updated Mylar for my Mac but now it won't start. I receive the following error message:

File "mylar.py", line 197, in main() File "mylar.py", line 148, in main mylar.initialize() File "/Applications/mylar-development/mylar/init.py", line 770, in initialize config_write() File "/Applications/mylar-development/mylar/init.py", line 1045, in config_write new_config['General']['comicvine_api'] = COMICVINE_API.strip()

How can I got about fixing this? I am a complete newb, so the greatest amount of detail is much appreciated!

Thank you!

evilhero commented 9 years ago

If you open up your config.ini file, do you see a line for comicvine_api near the top?

If you don't, you could add in the line (doesn't matter where, but near the top) : comicvine_api = ""

Just make sure mylar isn't running when you edit the ini file.

mzrpivwr commented 9 years ago

I received the following error after adding in the line:

File "/Applications/mylar-development/Mylar.py", line 197, in main() File "/Applications/mylar-development/Mylar.py", line 148, in main mylar.initialize() File "/Applications/mylar-development/mylar/init.py", line 770, in initialize config_write() File "/Applications/mylar-development/mylar/init.py", line 1045, in config_write new_config['General']['comicvine_api'] = COMICVINE_API.strip() AttributeError: 'NoneType' object has no attribute 'strip'

evilhero commented 9 years ago

Can you paste in your config.ini, or link to it somewhere.. Looks like you might have something messing it up.

Are you using your own Comicvine apikey or not specifying one?

mzrpivwr commented 9 years ago

I've been using Mylar for quite some time and I don't recall every configuring an API key.

[General] config_version = 5 http_port = 8090 http_host = 0.0.0.0 http_username = "" http_password = "" http_root = / comicvine_api = "" api_enabled = 0 api_key = "" launch_browser = 0 log_dir = /Applications/mylar-development/logs logverbose = 1 git_path = "" cache_dir = /Applications/mylar-development/cache annuals_on = 1 cv_only = 1 cv_onetimer = 1 cvapifix = 0 check_github = 1 check_github_on_startup = 1 check_github_interval = 360 destination_dir = XXXX chmod_dir = 0777 chmod_file = 0660 usenet_retention = 1500 search_interval = 360 nzb_startup_search = 1 libraryscan = 0 libraryscan_interval = 300 add_comics = 0 comic_dir = XXXX imp_move = 1 imp_rename = 1 imp_metadata = 0 download_scan_interval = 5 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 = 1 folder_format = $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 = 0 grabbag_dir = XXXX 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-10-10 17:21:32 provider_order = 0, XXXX nzb_downloader = 0 [Torrents] enable_torrents = 0 torrent_local = 0 local_watchdir = "" torrent_seedbox = 0 seedbox_host = "" seedbox_port = "" seedbox_user = "" seedbox_pass = "" seedbox_watchdir = "" enable_torrent_search = 0 enable_kat = 0 kat_proxy = "" enable_cbt = 0 cbt_passkey = ""

deleted the remaining provider info

evilhero commented 9 years ago

Mylar requires a ComicVine API Key to work properly. There is one that it will use if nothing is provided, but because ComicVine limits the amount of api hits every 15 minutes ( I think it's 400 hits/15 mins ), once it maxes out it won't work until that duration is up. Plus, if you figure you're sharing that api key with everyone else who doesn't have their own api key - then you can understand how the quickly the 400 hits would evaporate.

It's free, just go to http://api.comicvine.com and sign up. Plunk in your api key in the GUI configuration, save and restart Mylar and you'll probably notice things improve significantly.

Putting in the key will get rid of that error, and I'll have to add in a catch for those that don't have their own key yet (I'll probably request to disable the generic one soon anyways).

mzrpivwr commented 9 years ago

That worked great and it now starts and I'm able to refresh the various series with new info; however, when I attempt to initiate a download for something I can see is available through my search provider, it fails to find anything:

2015-01-15 18:39:28 INFO [ComicVine API] Comicvine API count now at : 0 / 400 in 9.68 minutes. 2015-01-15 18:35:01 INFO Could not find issue doing a manual search via : api 2015-01-15 18:35:01 INFO Could not find issue doing a manual search via : rss 2015-01-15 18:35:01 INFO search provider order is [] 2015-01-15 18:35:01 INFO Issue Title given as : none 2015-01-15 18:35:01 INFO Initiating manual search for The Wicked + The Divine issue: 6

Any idea what is going wrong?

Thank again for all of the help.

evilhero commented 9 years ago

The search provider order is the problem, as it's empty in that log.

After any configuration change, you need to restart mylar so that the new values will load properly. Not doing that will cause an empty Search provider log line like you have.

Shutdown mylar, and edit the config.ini. Find the line that says provider_order and delete the entire line (yes, the entire line). Then save it, and restart Mylar. It will generate a new provider_order based on what you have enabled for providers and populate according to that.

Once it's generated and working ok, you can shutdown mylar and re-edit the config.ini and change the provider_order sequence to your liking. Just make sure to use the exact names that are provided in that line when you're changing the order or else mylar will assume it's disabled and not use it (or give you an empty provider order again)

mzrpivwr commented 9 years ago

You rock.