piejanssens / premiumizer

Download manager for premiumize.me cloud downloads
MIT License
172 stars 45 forks source link

Problems loading task list #181

Closed MasterIpse closed 5 years ago

MasterIpse commented 5 years ago

The file list from premiumize on the "home" tab isn't loading any longer. I'm on the latest image, running a docker container on an unraid server.

Debug output: UnboundLocalError: local variable 'dldir' referenced before assignment 04-26 10:22:59 apscheduler.scheduler : DEBUG : Looking for jobs to run 04-26 10:22:59 apscheduler.scheduler : DEBUG : Next wakeup is due at 2019-04-26 10:23:00.355381-07:00 (in 0.997831 seconds) 04-26 10:22:59 apscheduler.executors.default : INFO : Running job "update (trigger: interval[0:00:01], next run at: 2019-04-26 10:23:00 PDT)" (scheduled at 2019-04-26 10:22:59.355381-07:00) 04-26 10:22:59 root : DEBUG : def update started 04-26 10:22:59 root : DEBUG : def prem_connection started 04-26 10:22:59 urllib3.connectionpool : DEBUG : https://www.premiumize.me:443 "POST /api/transfer/list HTTP/1.1" 200 None 04-26 10:22:59 root : DEBUG : def parse_task started 04-26 10:22:59 root : DEBUG : def get_task started 04-26 10:22:59 root : DEBUG : def add_task started 04-26 10:22:59 root : DEBUG : def get_task started 04-26 10:22:59 root : DEBUG : def get_cat_var started 04-26 10:22:59 apscheduler.executors.default : ERROR : Job "update (trigger: interval[0:00:01], next run at: 2019-04-26 10:23:00 PDT)" raised an exception Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "./premiumizer/premiumizer.py", line 1373, in update idle = parse_tasks(transfers) File "./premiumizer/premiumizer.py", line 1437, in parse_tasks add_task(transfer['id'], size, name, 'default', folder_id=folder_id) File "./premiumizer/premiumizer.py", line 1585, in add_task dldir, dlext, delsample, dlnzbtomedia = get_cat_var(category) File "./premiumizer/premiumizer.py", line 1578, in get_cat_var return dldir, dlext, delsample, dlnzbtomedia

neox387 commented 5 years ago

That log isn't complete :)

Guessing it's gonna be some configuration error maybe in the categorys section?

MasterIpse commented 5 years ago

The log starts with: 04-26 10:22:15 root : DEBUG : DEBUG Logfile Initialized 04-26 10:22:15 root : DEBUG : Initializing config 04-26 10:22:15 urllib3.connectionpool : DEBUG : Starting new HTTPS connection (1): api.jdownloader.org:443 04-26 10:22:16 urllib3.connectionpool : DEBUG : https://api.jdownloader.org:443 "GET /my/connect?email=... HTTP/1.1" 200 None 04-26 10:22:16 urllib3.connectionpool : DEBUG : Starting new HTTPS connection (1): api.jdownloader.org:443 04-26 10:22:16 urllib3.connectionpool : DEBUG : https://api.jdownloader.org:443 "GET /my/listdevices?sessiontoken=... HTTP/1.1" 200 None 04-26 10:22:16 urllib3.connectionpool : DEBUG : Starting new HTTPS connection (1): api.jdownloader.org:443 04-26 10:22:16 urllib3.connectionpool : DEBUG : https://api.jdownloader.org:443 "POST /.../device/getDirectConnectionInfos HTTP/1.1" 200 None 04-26 10:22:16 urllib3.connectionpool : DEBUG : Starting new HTTP connection (1): 172.17.0.5:44443 04-26 10:22:16 urllib3.connectionpool : DEBUG : http://172.17.0.5:44443 "POST /.../toolbar/getStatus HTTP/1.1" 200 None 04-26 10:22:16 root : INFO : Watchdir is enabled at: /blackhole 04-26 10:22:16 root : DEBUG : Initializing config complete 04-26 10:22:16 root : DEBUG : Initializing Flask 04-26 10:22:18 engineio.server : INFO : Server initialized for gevent. 04-26 10:22:18 root : DEBUG : Initializing Flask complete 04-26 10:22:18 root : DEBUG : Initializing Database 04-26 10:22:18 root : DEBUG : Database cleared 04-26 10:22:18 root : DEBUG : Initializing Database complete 04-26 10:22:18 root : INFO : Starting server on 0.0.0.0:5000 04-26 10:22:18 root : DEBUG : def load_tasks started 04-26 10:22:19 apscheduler.scheduler : INFO : Scheduler started 04-26 10:22:19 apscheduler.scheduler : INFO : Added job "update" to job store "default" 04-26 10:22:20 apscheduler.scheduler : DEBUG : Looking for jobs to run 04-26 10:22:20 apscheduler.scheduler : DEBUG : Next wakeup is due at 2019-04-26 10:22:29.755492-07:00 (in 8.885397 seconds) 04-26 10:22:21 root : DEBUG : Initializing watchdog 04-26 10:22:21 root : DEBUG : Initializing watchdog complete 04-26 10:22:23 geventwebsocket.handler : DEBUG : Initializing WebSocket 04-26 10:22:23 geventwebsocket.handler : DEBUG : Validating WebSocket request 04-26 10:22:23 engineio.server : INFO : a8a47221875...: Sending packet OPEN data {'sid': 'a8a47221875...', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000} 04-26 10:22:23 socketio.server : INFO : emitting event "hello_client" to a8a47221875... [/] 04-26 10:22:23 engineio.server : INFO : a8a47221875...: Sending packet MESSAGE data 2["hello_client",{"data":"Server says hello!"}] 04-26 10:22:23 engineio.server : INFO : a8a47221875...: Sending packet MESSAGE data 0 04-26 10:22:23 geventwebsocket.handler : INFO : 192.168.2.121 - - [2019-04-26 10:22:23] "GET /socket.io/?EIO=3&transport=polling&t=MfQguDQ HTTP/1.1" 200 409 0.093011 04-26 10:22:24 geventwebsocket.handler : DEBUG : Initializing WebSocket 04-26 10:22:24 geventwebsocket.handler : DEBUG : Validating WebSocket request 04-26 10:22:24 geventwebsocket.handler : DEBUG : Can only upgrade connection if using GET method. 04-26 10:22:24 engineio.server : INFO : a8a47221875...: Received packet MESSAGE data 2["hello_server",{"data":"Client says hello!"}] 04-26 10:22:24 socketio.server : INFO : received event "hello_server" from a8a47221875... [/] 04-26 10:22:24 root : DEBUG : def send_categories started 04-26 10:22:24 socketio.server : INFO : emitting event "download_categories" to a8a47221875... [/] 04-26 10:22:24 engineio.server : INFO : a8a47221875...: Sending packet MESSAGE data 2["download_categories",{"data":["tv","movie"]}] 04-26 10:22:24 geventwebsocket.handler : INFO : 192.168.2.121 - - [2019-04-26 10:22:24] "POST /socket.io/?EIO=3&transport=polling&t=MfQguH4&sid=a8a47221875... HTTP/1.1" 200 197 0.342547 04-26 10:22:24 apscheduler.scheduler : DEBUG : Looking for jobs to run 04-26 10:22:24 apscheduler.scheduler : DEBUG : Next wakeup is due at 2019-04-26 10:22:25.355381-07:00 (in 0.998003 seconds) 04-26 10:22:24 geventwebsocket.handler : DEBUG : Initializing WebSocket 04-26 10:22:24 geventwebsocket.handler : DEBUG : Validating WebSocket request 04-26 10:22:24 geventwebsocket.handler : DEBUG : Attempting to upgrade connection 04-26 10:22:24 geventwebsocket.handler : DEBUG : WebSocket request accepted, switching protocols 04-26 10:22:24 engineio.server : INFO : a8a47221875...: Received request to upgrade to websocket 04-26 10:22:24 geventwebsocket.handler : DEBUG : Initializing WebSocket 04-26 10:22:24 geventwebsocket.handler : DEBUG : Validating WebSocket request 04-26 10:22:24 geventwebsocket.handler : INFO : 192.168.2.121 - - [2019-04-26 10:22:24] "GET /socket.io/?EIO=3&transport=polling&t=MfQguH6&sid=a8a47221875... HTTP/1.1" 200 241 0.001145 04-26 10:22:24 engineio.server : INFO : a8a47221875...: Upgrade to websocket successful 04-26 10:22:25 apscheduler.scheduler : DEBUG : Looking for jobs to run 04-26 10:22:25 apscheduler.scheduler : DEBUG : Next wakeup is due at 2019-04-26 10:22:26.355381-07:00 (in 0.997811 seconds) 04-26 10:22:25 apscheduler.executors.default : INFO : Running job "update (trigger: interval[0:00:01], next run at: 2019-04-26 10:22:26 PDT)" (scheduled at 2019-04-26 10:22:25.355381-07:00) 04-26 10:22:25 root : DEBUG : def update started 04-26 10:22:25 root : DEBUG : def prem_connection started 04-26 10:22:25 urllib3.connectionpool : DEBUG : Starting new HTTPS connection (1): www.premiumize.me:443 04-26 10:22:25 urllib3.connectionpool : DEBUG : https://www.premiumize.me:443 "POST /api/transfer/list HTTP/1.1" 200 None 04-26 10:22:25 root : DEBUG : def parse_task started 04-26 10:22:25 root : DEBUG : def get_task started 04-26 10:22:25 root : DEBUG : def add_task started 04-26 10:22:25 root : DEBUG : def get_task started 04-26 10:22:25 root : DEBUG : def get_cat_var started

And then repeats: 04-26 10:22:25 apscheduler.executors.default : ERROR : Job "update (trigger: interval[0:00:01], next run at: 2019-04-26 10:22:26 PDT)" raised an exception Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "./premiumizer/premiumizer.py", line 1373, in update idle = parse_tasks(transfers) File "./premiumizer/premiumizer.py", line 1437, in parse_tasks add_task(transfer['id'], size, name, 'default', folder_id=folder_id) File "./premiumizer/premiumizer.py", line 1585, in add_task dldir, dlext, delsample, dlnzbtomedia = get_cat_var(category) File "./premiumizer/premiumizer.py", line 1578, in get_cat_var return dldir, dlext, delsample, dlnzbtomedia UnboundLocalError: local variable 'dldir' referenced before assignment 04-26 10:22:26 apscheduler.scheduler : DEBUG : Looking for jobs to run 04-26 10:22:26 apscheduler.scheduler : DEBUG : Next wakeup is due at 2019-04-26 10:22:27.355381-07:00 (in 0.996892 seconds) 04-26 10:22:26 apscheduler.executors.default : INFO : Running job "update (trigger: interval[0:00:01], next run at: 2019-04-26 10:22:27 PDT)" (scheduled at 2019-04-26 10:22:26.355381-07:00) 04-26 10:22:26 root : DEBUG : def update started 04-26 10:22:26 root : DEBUG : def prem_connection started 04-26 10:22:26 urllib3.connectionpool : DEBUG : https://www.premiumize.me:443 "POST /api/transfer/list HTTP/1.1" 200 None 04-26 10:22:26 root : DEBUG : def parse_task started 04-26 10:22:26 root : DEBUG : def get_task started 04-26 10:22:26 root : DEBUG : def add_task started 04-26 10:22:26 root : DEBUG : def get_task started 04-26 10:22:26 root : DEBUG : def get_cat_var started

The config file looks normal to me: username = password =

[premiumize] customer_id = [...] pin = [...]

[downloads] download_enabled = 1 download_all = 1 download_rss = 0 download_max = 1 download_threads = 1 download_speed = -1 remove_cloud = 1 remove_cloud_delay = 1 seed_torrent = 0 download_location = \ nzbtomedia_location = [Change to path]\nzbToMedia.py jd_enabled = 1 jd_username = [...] jd_password = [...] jd_device_name = [...] aria2_enabled = 0 aria2_host = localhost aria2_port = 6800 aria2_secret = premiumizer

[categories] cat_name[1] = tv cat_dir[1] = cat_ext[1] = cat_delsample[1] = 0 cat_nzbtomedia[1] = 0 cat_name[2] = movie cat_dir[2] = cat_ext[2] = cat_delsample[2] = 0 cat_nzbtomedia[2] = 0 cat_name[3] = cat_dir[3] = cat_ext[3] = cat_delsample[3] = 0 cat_nzbtomedia[3] = 0 cat_name[4] = cat_dir[4] = cat_ext[4] = cat_delsample[4] = 0 cat_nzbtomedia[4] = 0 cat_name[5] = cat_dir[5] = cat_ext[5] = cat_delsample[5] = 0 cat_nzbtomedia[5] = 0 cat_name[6] = cat_dir[6] = cat_ext[6] = cat_delsample[6] = 0 cat_nzbtomedia[6] = 0

[upload] watchdir_enabled = 1 watchdir_location = /blackhole

[notifications] email_enabled = 0 email_on_failure = 0 email_from = "Premiumizer" premiumizer@gmail.com email_to = myaccount@gmail.com email_server = email_port = 25 email_encryption = 0 email_username = email_password =

[update] updated = 0 auto_update = 0 update_date = Never config_version = 2.1 req_version = 8.8

neox387 commented 5 years ago

well I fixed the error but it shouldn't happen.

so you have the default tv and movie and this error would occur says if premiumizer added something with a category other then tv or movie ..

I think atm it ads something that is not in premiumizer but is in the cloud