faulander / p4s Goto Github PK
View Code? Open in Web Editor NEWPremieres for Sonarr - a small sonarr companion app to find all the new shows you've never known you're interested in!
License: MIT License
Premieres for Sonarr - a small sonarr companion app to find all the new shows you've never known you're interested in!
License: MIT License
When browsing to the settings tab, i get the error Server Error (500). Is there a way this can be looked into?
refactoring on how the firstrun and connection stuff is working.
arogl@MSI-GE62 H:\Git\P4S
$ pipenv install
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.3 (C:\Users\arogl\.\P\S\python.exe).
$ pipenv --rm and rebuilding the virtual environment may resolve the issue.
$ pipenv check will surely fail.
Installing dependencies from Pipfile.lock (2b1daf)…
================================ 21/21 - 00:00:04
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
arogl@MSI-GE62 H:\Git\P4S
$ pipenv run
arogl@MSI-GE62 H:\Git\P4S
$ cd src
arogl@MSI-GE62 H:\Git\P4S\src
$ pipenv run python manage.py migrate
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.3 (C:\Users\arogl\.\P\S\python.exe).
$ pipenv --rm and rebuilding the virtual environment may resolve the issue.
$ pipenv check will surely fail.
Python-dotenv could not parse statement starting at line 8
Operations to perform:
Apply all migrations: admin, auth, contenttypes, newshows, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying newshows.0001_initial... OK
Applying newshows.0002_setting_profile... OK
Applying newshows.0003_setting_addmonitored... OK
Applying newshows.0004_auto_20200112_1950... OK
Applying sessions.0001_initial... OK
arogl@MSI-GE62 H:\Git\P4S\src
$ pipenv run python manage.py loaddata settings.json
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.3 (C:\Users\arogl\.\P\S\python.exe).
$ pipenv --rm and rebuilding the virtual environment may resolve the issue.
$ pipenv check will surely fail.
Python-dotenv could not parse statement starting at line 8
Installed 1 object(s) from 1 fixture(s)
arogl@MSI-GE62 H:\Git\P4S\src
$ pipenv run python manage.py firstrun
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.3 (C:\Users\arogl\.\P\S\python.exe).
$ pipenv --rm and rebuilding the virtual environment may resolve the issue.
$ pipenv check will surely fail.
Python-dotenv could not parse statement starting at line 8
2020-01-21 11:47:00,149 INFO [newshows.helpers:27] Trying http://127.0.0.1:8989/api/system/status/?apikey=ee480c7c174a4d628ee951a6a5ee3bd0
2020-01-21 11:47:00,161 INFO [newshows.helpers:64] Connection to Sonarr established.
Successfully connected to Sonarr
2020-01-21 11:47:00,162 INFO [newshows.management.commands.firstrun:29] Empty db found.
2020-01-21 11:47:00,163 INFO [newshows.management.commands.firstrun:31] Initial Setup starting.
arogl@MSI-GE62 H:\Git\P4S\src
$ pipenv run python manage.py runserver
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.3 (C:\Users\arogl\.\P\S\python.exe).
$ pipenv --rm and rebuilding the virtual environment may resolve the issue.
$ pipenv check will surely fail.
Python-dotenv could not parse statement starting at line 8
Python-dotenv could not parse statement starting at line 8
2020-01-21 11:47:10,578 INFO [django.utils.autoreload:598] Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
January 21, 2020 - 11:47:10
Django version 3.0.2, using settings 'new_shows.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
2020-01-21 11:47:15,151 INFO [django.server:157] "GET /settings/ HTTP/1.1" 200 3704
2020-01-21 11:47:18,825 INFO [newshows.helpers:27] Trying http://127.0.0.1:8989/api/history/?apikey=ee480c7c174a4d628ee951a6a5ee3bd0
2020-01-21 11:47:19,028 INFO [newshows.helpers:44] History from Sonarr fetched.
2020-01-21 11:47:19,029 INFO [newshows.helpers:51] [{'episode': 'Pequenas.Coincidencias.S01E08.WEBRip.x264-ION10', 'date': DateTime(2020, 1, 20, 22, 53, 35, 366981, tzinfo=Timezone('+00:00'))}, {'episode': 'Pequenas.Coincidencias.S01E07.WEBRip.x264-ION10', 'date': DateTime(2020, 1, 20, 22, 53, 22, 44983, tzinfo=Timezone('+00:00'))}, {'episode': 'Pequenas.Coincidencias.S01E06.WEBRip.x264-ION10', 'date': DateTime(2020, 1, 20, 22, 53, 5, 381990, tzinfo=Timezone('+00:00'))}, {'episode': 'Pequenas.Coincidencias.S01E04.WEBRip.x264-ION10', 'date': DateTime(2020, 1, 20, 22, 52, 53, 40982, tzinfo=Timezone('+00:00'))}, {'episode': 'Pequenas.Coincidencias.S01E03.WEBRip.x264-ION10', 'date': DateTime(2020, 1, 20, 22, 52, 40, 461980, tzinfo=Timezone('+00:00'))}, {'episode': 'Pequenas.Coincidencias.S01E02.WEBRip.x264-ION10', 'date': DateTime(2020, 1, 20, 22, 52, 28, 310980, tzinfo=Timezone('+00:00'))}, {'episode': 'Pequenas.Coincidencias.S01E01.WEBRip.x264-ION10', 'date': DateTime(2020, 1, 20, 22, 52, 11, 183979, tzinfo=Timezone('+00:00'))}, {'episode': 'Batwoman.S01E10.720p.x265-ZMNT', 'date': DateTime(2020, 1, 20, 20, 52, 34, 499806, tzinfo=Timezone('+00:00'))}, {'episode': 'D:\\TV Shows\\Batwoman\\Season 01\\Batwoman - S01E10 - How Queer Everything is Today!.mkv', 'date': DateTime(2020, 1, 20, 20, 52, 30, 675799, tzinfo=Timezone('+00:00'))}, {'episode': 'Batwoman.S01E10.720p.x265-ZMNT', 'date': DateTime(2020, 1, 20, 20, 38, 29, 184798, tzinfo=Timezone('+00:00'))}]
2020-01-21 11:47:19,041 INFO [django.server:157] "GET /downloads/ HTTP/1.1" 200 3993
C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\views\generic\list.py:88: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'newshows.models.Show'> QuerySet.
allow_empty_first_page=allow_empty_first_page, **kwargs)
2020-01-21 11:47:21,577 INFO [django.server:157] "GET /shows/ HTTP/1.1" 200 9619
Aborted!
arogl@MSI-GE62 H:\Git\P4S\src
$ pipenv run python manage.py run_huey
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.3 (C:\Users\arogl\.\P\S\python.exe).
$ pipenv --rm and rebuilding the virtual environment may resolve the issue.
$ pipenv check will surely fail.
Python-dotenv could not parse statement starting at line 8
[2020-01-21 11:49:17,977] INFO:huey.consumer:MainThread:Huey consumer started with 1 thread, PID 26508 at 2020-01-21 01:49:17.977784
2020-01-21 11:49:17,977 INFO [huey.consumer:360] Huey consumer started with 1 thread, PID 26508 at 2020-01-21 01:49:17.977784
[2020-01-21 11:49:17,978] INFO:huey.consumer:MainThread:Scheduler runs every 1 second(s).
2020-01-21 11:49:17,978 INFO [huey.consumer:362] Scheduler runs every 1 second(s).
[2020-01-21 11:49:17,979] INFO:huey.consumer:MainThread:Periodic tasks are enabled.
2020-01-21 11:49:17,979 INFO [huey.consumer:364] Periodic tasks are enabled.
[2020-01-21 11:49:17,980] INFO:huey.consumer:MainThread:The following commands are available:
+ newshows.helpers.HelperUpdateSonarr
+ newshows.helpers.HelperUpdateTVMaze
+ huey.api.inner
+ newshows.helpers.HelperUpdateShows
+ newshows.helpers.helperGetSonarrProfiles
2020-01-21 11:49:17,980 INFO [huey.consumer:370] The following commands are available:
+ newshows.helpers.HelperUpdateSonarr
+ newshows.helpers.HelperUpdateTVMaze
+ huey.api.inner
+ newshows.helpers.HelperUpdateShows
+ newshows.helpers.helperGetSonarrProfiles
[2020-01-21 11:49:17,988] INFO:huey:Worker-1:Executing huey.api.inner: 7f9204c7-82e6-4e4a-bdbf-2255a3f7d6c5
2020-01-21 11:49:17,988 INFO [huey:327] Executing huey.api.inner: 7f9204c7-82e6-4e4a-bdbf-2255a3f7d6c5
[2020-01-21 11:49:17,989] INFO:huey:Worker-1:huey.api.inner: 7f9204c7-82e6-4e4a-bdbf-2255a3f7d6c5 executed in 0.001s
2020-01-21 11:49:17,989 INFO [huey:364] huey.api.inner: 7f9204c7-82e6-4e4a-bdbf-2255a3f7d6c5 executed in 0.001s
[2020-01-21 11:49:17,989] ERROR:huey.consumer.Worker:Worker-1:Unhandled error during execution of task 7f9204c7-82e6-4e4a-bdbf-2255a3f7d6c5.
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\consumer.py", line 102, in loop
self.huey.execute(task, now)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 329, in execute
return self._execute(task, timestamp)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 378, in _execute
self.put_result(task.id, task_value)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 293, in put_result
return self.storage.put_data(key, self.serializer.serialize(data),
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\serializer.py", line 62, in serialize
data = self._serialize(data)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\serializer.py", line 56, in _serialize
return pickle.dumps(data, pickle.HIGHEST_PROTOCOL)
TypeError: can't pickle _ConnectionLocal objects
2020-01-21 11:49:17,989 ERROR [huey.consumer.Worker:105] Unhandled error during execution of task 7f9204c7-82e6-4e4a-bdbf-2255a3f7d6c5.
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\consumer.py", line 102, in loop
self.huey.execute(task, now)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 329, in execute
return self._execute(task, timestamp)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 378, in _execute
self.put_result(task.id, task_value)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 293, in put_result
return self.storage.put_data(key, self.serializer.serialize(data),
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\serializer.py", line 62, in serialize
data = self._serialize(data)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\serializer.py", line 56, in _serialize
return pickle.dumps(data, pickle.HIGHEST_PROTOCOL)
TypeError: can't pickle _ConnectionLocal objects
[2020-01-21 11:49:18,017] INFO:huey:Worker-1:Executing newshows.helpers.HelperUpdateTVMaze: c3c79857-b88f-4eaf-a767-4efe62dad713
2020-01-21 11:49:18,017 INFO [huey:327] Executing newshows.helpers.HelperUpdateTVMaze: c3c79857-b88f-4eaf-a767-4efe62dad713
2020-01-21 11:49:18,020 INFO [newshows.helpers:27] Trying http://api.tvmaze.com/shows?page=0
2020-01-21 11:49:22,091 INFO [newshows.helpers:194] New show added: Under the Dome
2020-01-21 11:49:23,654 INFO [newshows.helpers:194] New show added: Person of Interest
2020-01-21 11:49:25,441 INFO [newshows.helpers:194] New show added: Bitten
2020-01-21 11:49:26,994 INFO [newshows.helpers:194] New show added: Arrow
2020-01-21 11:49:28,325 INFO [newshows.helpers:194] New show added: True Detective
2020-01-21 11:49:29,579 INFO [newshows.helpers:194] New show added: The 100
2020-01-21 11:49:30,810 INFO [newshows.helpers:194] New show added: Homeland
2020-01-21 11:49:31,964 INFO [newshows.helpers:194] New show added: Glee
2020-01-21 11:49:33,173 INFO [newshows.helpers:194] New show added: Revenge
Added about 20 shows
2020-01-21 11:50:13,790 INFO [newshows.helpers:194] New show added: Brooklyn Nine-Nine
2020-01-21 11:50:14,879 INFO [newshows.helpers:194] New show added: The Lottery
2020-01-21 11:50:16,454 INFO [newshows.helpers:194] New show added: The Knick
2020-01-21 11:50:17,429 INFO [newshows.helpers:194] New show added: How to Get Away with Murder
[2020-01-21 11:50:17,978] INFO:huey.consumer.Scheduler:Scheduler:Enqueueing periodic task newshows.helpers.HelperUpdateSonarr: c9bf6884-8aa4-4c0d-88e7-6ce851a129e5.
2020-01-21 11:50:17,978 INFO [huey.consumer.Scheduler:163] Enqueueing periodic task newshows.helpers.HelperUpdateSonarr: c9bf6884-8aa4-4c0d-88e7-6ce851a129e5.
[2020-01-21 11:50:17,980] INFO:huey.consumer.Scheduler:Scheduler:Enqueueing periodic task newshows.helpers.helperGetSonarrProfiles: 33836246-4275-4b8f-bac2-1a412d314fe7.
2020-01-21 11:50:17,980 INFO [huey.consumer.Scheduler:163] Enqueueing periodic task newshows.helpers.helperGetSonarrProfiles: 33836246-4275-4b8f-bac2-1a412d314fe7.
2020-01-21 11:50:18,605 INFO [newshows.helpers:194] New show added: Nashville
2020-01-21 11:50:19,759 INFO [newshows.helpers:194] New show added: Legends
2020-01-21 11:50:20,780 INFO [newshows.helpers:194] New show added: Red Band Society
2020-01-21 11:50:21,689 INFO [newshows.helpers:194] New show added: Chicago P.D.
2020-01-21 11:50:22,466 INFO [newshows.helpers:194] New show added: black-ish
2020-01-21 11:50:23,366 INFO [newshows.helpers:194] New show added: New Girl
2020-01-21 11:50:24,186 INFO [newshows.helpers:194] New show added: Chicago Fire
added about 190 shows in total
2020-01-21 11:53:18,178 INFO [newshows.helpers:194] New show added: Long Shadow
2020-01-21 11:53:19,098 INFO [newshows.helpers:194] New show added: The Colbert Report
2020-01-21 11:53:19,944 INFO [newshows.helpers:194] New show added: Transporter: The Series
2020-01-21 11:53:20,732 INFO [newshows.helpers:194] New show added: The Daily Show with Jon Stewart
[2020-01-21 11:53:21,109] ERROR:huey:Worker-1:Unhandled exception in task c3c79857-b88f-4eaf-a767-4efe62dad713.
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\options.py", line 581, in get_field
return self.fields_map[field_name]
KeyError: 'page'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 345, in _execute
task_value = task.execute()
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 697, in execute
return func(*args, **kwargs)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\contrib\djhuey\__init__.py", line 132, in inner
return fn(*args, **kwargs)
File "H:\Git\P4S\src\newshows\helpers.py", line 202, in HelperUpdateTVMaze
q = Show.objects.filter(Q(pk=1)).update(page=page)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\query.py", line 748, in update
query.add_update_values(kwargs)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\sql\subqueries.py", line 117, in add_update_values
field = self.get_meta().get_field(name)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\options.py", line 583, in get_field
raise FieldDoesNotExist("%s has no field named '%s'" % (self.object_name, field_name))
django.core.exceptions.FieldDoesNotExist: Show has no field named 'page'
2020-01-21 11:53:21,109 ERROR [huey:360] Unhandled exception in task c3c79857-b88f-4eaf-a767-4efe62dad713.
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\options.py", line 581, in get_field
return self.fields_map[field_name]
KeyError: 'page'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 345, in _execute
task_value = task.execute()
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 697, in execute
return func(*args, **kwargs)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\contrib\djhuey\__init__.py", line 132, in inner
return fn(*args, **kwargs)
File "H:\Git\P4S\src\newshows\helpers.py", line 202, in HelperUpdateTVMaze
q = Show.objects.filter(Q(pk=1)).update(page=page)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\query.py", line 748, in update
query.add_update_values(kwargs)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\sql\subqueries.py", line 117, in add_update_values
field = self.get_meta().get_field(name)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\options.py", line 583, in get_field
raise FieldDoesNotExist("%s has no field named '%s'" % (self.object_name, field_name))
django.core.exceptions.FieldDoesNotExist: Show has no field named 'page'
[2020-01-21 11:53:21,124] INFO:huey:Worker-1:Executing newshows.helpers.HelperUpdateSonarr: c9bf6884-8aa4-4c0d-88e7-6ce851a129e5
2020-01-21 11:53:21,124 INFO [huey:327] Executing newshows.helpers.HelperUpdateSonarr: c9bf6884-8aa4-4c0d-88e7-6ce851a129e5
[2020-01-21 11:53:21,125] INFO:huey:Worker-1:newshows.helpers.HelperUpdateSonarr: c9bf6884-8aa4-4c0d-88e7-6ce851a129e5 executed in 0.000s
2020-01-21 11:53:21,125 INFO [huey:364] newshows.helpers.HelperUpdateSonarr: c9bf6884-8aa4-4c0d-88e7-6ce851a129e5 executed in 0.000s
[2020-01-21 11:53:21,126] INFO:huey:Worker-1:Executing newshows.helpers.helperGetSonarrProfiles: 33836246-4275-4b8f-bac2-1a412d314fe7
2020-01-21 11:53:21,126 INFO [huey:327] Executing newshows.helpers.helperGetSonarrProfiles: 33836246-4275-4b8f-bac2-1a412d314fe7
2020-01-21 11:53:21,127 INFO [newshows.helpers:27] Trying http://127.0.0.1:8989/api/profile/?apikey=ee480c7c174a4d628ee951a6a5ee3bd0
[2020-01-21 11:53:21,819] INFO:huey:Worker-1:newshows.helpers.helperGetSonarrProfiles: 33836246-4275-4b8f-bac2-1a412d314fe7 executed in 0.692s
2020-01-21 11:53:21,819 INFO [huey:364] newshows.helpers.helperGetSonarrProfiles: 33836246-4275-4b8f-bac2-1a412d314fe7 executed in 0.692s
^C
arogl@MSI-GE62 H:\Git\P4S\src
During the runserver section, I can see the default settings have been loaded, no shows and query the last downloads
^^^
When I setup P4S, the settings.json was not applied correctly, so I manually added a record to the "newshows_setting" table using
insert into newshows_setting (id, page, profile_id, seasonfolders, addmonitored) values(1,0,1,1,1)
This managed to get the shows loaded and working, but now I have nothing in the newshows_setting table.
[2020-01-15 18:02:40,055] INFO:huey:Worker-1:Executing newshows.helpers.HelperUpdateTVMaze: c00dc9f0-c230-4527-8179-2c1828678188
2020-01-15 18:02:40,055 INFO [huey:327] Executing newshows.helpers.HelperUpdateTVMaze: c00dc9f0-c230-4527-8179-2c1828678188
[2020-01-15 18:02:40,057] ERROR:huey:Worker-1:Unhandled exception in task c00dc9f0-c230-4527-8179-2c1828678188.
Traceback (most recent call last):
File "C:\Python37\lib\site-packages\huey\api.py", line 345, in _execute
task_value = task.execute()
File "C:\Python37\lib\site-packages\huey\api.py", line 697, in execute
return func(*args, **kwargs)
File "C:\Python37\lib\site-packages\huey\contrib\djhuey\__init__.py", line 132, in inner
return fn(*args, **kwargs)
File "H:\Git\P4S\src\newshows\helpers.py", line 120, in HelperUpdateTVMaze
settings = Setting.objects.get(id=1)
File "C:\Python37\lib\site-packages\django\db\models\manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "C:\Python37\lib\site-packages\django\db\models\query.py", line 417, in get
self.model._meta.object_name
newshows.models.Setting.DoesNotExist: Setting matching query does not exist.
2020-01-15 18:02:40,057 ERROR [huey:360] Unhandled exception in task c00dc9f0-c230-4527-8179-2c1828678188.
Traceback (most recent call last):
File "C:\Python37\lib\site-packages\huey\api.py", line 345, in _execute
task_value = task.execute()
File "C:\Python37\lib\site-packages\huey\api.py", line 697, in execute
return func(*args, **kwargs)
File "C:\Python37\lib\site-packages\huey\contrib\djhuey\__init__.py", line 132, in inner
return fn(*args, **kwargs)
File "H:\Git\P4S\src\newshows\helpers.py", line 120, in HelperUpdateTVMaze
settings = Setting.objects.get(id=1)
File "C:\Python37\lib\site-packages\django\db\models\manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "C:\Python37\lib\site-packages\django\db\models\query.py", line 417, in get
self.model._meta.object_name
newshows.models.Setting.DoesNotExist: Setting matching query does not exist.
Hi,
When trying to run P4S on port 1337 i get Bad request (400) error.
hi,
I am running sonarr 3.0.3.688
When I run the first request to try and debug why not working, it returns an encoding of 'text/html'
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> r = requests.get('http://127.0.0.1:8989/system/status?apikey=')
>>> r.text
'<!DOCTYPE html>\r\n<html lang="en">\r\n <head>\r\n <meta charset="utf-8" />\r\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\r\n <meta name="mobile-web-app-capable" content="yes" />\r\n <meta name="apple-mobile-web-app-capable" content="yes" />\r\n\r\n <!-- Chrome, Opera, and Firefox OS -->\r\n <meta name="theme-color" content="#3a3f51" />\r\n <!-- Windows Phone -->\r\n <meta name="msapplication-navbutton-color" content="#3a3f51" />\r\n\r\n <meta name="description" content="Sonarr (Preview)" />\r\n\r\n <link\r\n rel="apple-touch-icon"\r\n sizes="180x180"\r\n href="/Content/Images/Icons/apple-touch-icon.png?h=AcBDqibE27yWHbMU36dViw"\r\n />\r\n <link\r\n rel="icon"\r\n type="image/png"\r\n sizes="32x32"\r\n href="/Content/Images/Icons/favicon-32x32.png?h=s64FHSxrh1sgZCiBBIVikQ"\r\n />\r\n <link\r\n rel="icon"\r\n type="image/png"\r\n sizes="16x16"\r\n href="/Content/Images/Icons/favicon-16x16.png?h=wksVbPqhKGB2B5P0O0h8IQ"\r\n />\r\n <link rel="manifest" href="/Content/Images/Icons/manifest.json?h=DmoSjQqByGr1aINOqvSg9w" />\r\n <link\r\n rel="mask-icon"\r\n href="/Content/Images/Icons/safari-pinned-tab.svg?h=LLFuxx74TMIn3Vx2ai6a1A"\r\n color="#00ccff"\r\n />\r\n <link\r\n rel="shortcut icon"\r\n type="image/ico"\r\n href="/favicon.ico?h=ZX67/60OXHGhAQ+8myebHg"\r\n data-no-hash\r\n />\r\n <meta\r\n name="msapplication-config"\r\n content="/Content/Images/Icons/browserconfig.xml"\r\n />\r\n\r\n <link rel="stylesheet" type="text/css" href="/Content/Fonts/fonts.css?h=mBv1x1/yHnvphLclzeQIBA">\r\n <link rel="stylesheet" type="text/css" href="/Content/styles.css?h=Rq/FVI3WakxRPshJ9Ov/Ng">\r\n\r\n <title>Sonarr (Preview)</title>\r\n\r\n <!--\r\n The super basic styling for .root will live here,\r\n saves fighting with CSS Modules for ~10 lines\r\n -->\r\n <style>\r\n .root {\r\n overflow: hidden;\r\n height: 100%; /* needed for proper layout */\r\n }\r\n\r\n
@media only screen and (max-width: 768px) {\r\n .root {\r\n display: flex;\r\n flex-direction: column;\r\n min-height: 100%;\r\n height: auto;\r\n }\r\n }\r\n </style>\r\n </head>\r\n\r\n <body>\r\n <div id="portal-root"></div>\r\n <div id="root" class="root"></div>\r\n </body>\r\n\r\n <script src="/initialize.js"></script>\r\n <script src="/polyfills.js?h=89IBv/Tz0gLBcIaOutX0tA"></script>\r\n <script src="/vendors~index.js?h=p2hkHfIUNhNgh2+MCq4D7g"></script>\r\n <script src="/index.js?h=piqqUB3xvOfiTkYmc97Fyg"></script>\r\n</html>\r\n'
>>> print(r.url)
http://127.0.0.1:8989/system/status?apikey=
>>> r.encoding
'ISO-8859-1'
>>> r.headers['content-type']
'text/html'
>>>
I had a look here https://github.com/Sonarr/Sonarr/wiki/API and it says that a JSON response is returned.
Any help appreciated.
Thanks.
I am now getting the same error again
2020-01-22 20:07:14,012 INFO [newshows.helpers:196] Show already in DB: Sorcerous Stabber Orphen
[2020-01-22 20:07:14,742] ERROR:huey:Worker-1:Unhandled exception in task 2469f3c5-3481-441e-ae13-3835ffda4298.
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\options.py", line 581, in get_field
return self.fields_map[field_name]
KeyError: 'page'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 345, in _execute
task_value = task.execute()
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 697, in execute
return func(*args, **kwargs)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\contrib\djhuey\__init__.py", line 132, in inner
return fn(*args, **kwargs)
File "H:\Git\P4S\src\newshows\helpers.py", line 202, in HelperUpdateTVMaze
q = Show.objects.filter(Q(pk=1)).update(page=page)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\query.py", line 748, in update
query.add_update_values(kwargs)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\sql\subqueries.py", line 117, in add_update_values
field = self.get_meta().get_field(name)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\options.py", line 583, in get_field
raise FieldDoesNotExist("%s has no field named '%s'" % (self.object_name, field_name))
django.core.exceptions.FieldDoesNotExist: Show has no field named 'page'
2020-01-22 20:07:14,742 ERROR [huey:360] Unhandled exception in task 2469f3c5-3481-441e-ae13-3835ffda4298.
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\options.py", line 581, in get_field
return self.fields_map[field_name]
KeyError: 'page'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 345, in _execute
task_value = task.execute()
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\api.py", line 697, in execute
return func(*args, **kwargs)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\huey\contrib\djhuey\__init__.py", line 132, in inner
return fn(*args, **kwargs)
File "H:\Git\P4S\src\newshows\helpers.py", line 202, in HelperUpdateTVMaze
q = Show.objects.filter(Q(pk=1)).update(page=page)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\query.py", line 748, in update
query.add_update_values(kwargs)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\sql\subqueries.py", line 117, in add_update_values
field = self.get_meta().get_field(name)
File "C:\Users\arogl\.virtualenvs\P4S-7tjkeV1a\lib\site-packages\django\db\models\options.py", line 583, in get_field
raise FieldDoesNotExist("%s has no field named '%s'" % (self.object_name, field_name))
django.core.exceptions.FieldDoesNotExist: Show has no field named 'page'
It seems the main database is either corrupt or encrypted:
I then used the sqlite3 command line to open and check the database and all OK and working again.
The error occurs when running "run_huey", and the HelperUpdateTVMaze() runs and a page increment needs to be saved back to the database.
Originally posted by @arogl in #13 (comment)
Using the HEAD version, as apparently dev shouldn't be used. When trying to set up, I get the following error:
...
Creating p4s_nginx_1 ... done
===============================================================================================
P4S - Migrate Database
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 220, in ensure_connection
self.connect()
File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 197, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 185, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.8/site-packages/psycopg2/__init__.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL: password authentication failed for user "app_user"
For reference, .env.prod
looks like this:
DEBUG=0
SECRET_KEY=ANewKeyForPremieresForSonarrGoesHere
DJANGO_ALLOWED_HOSTS=*
# CHOOSE DATABASE BACKEND, POSTGRES IS STANDARD
SQL_ENGINE=django.db.backends.postgresql
#SQL_ENGINE=django.db.backends.mysql
# IF YOU'RE USING AN EXISTING DB, PLEASE CHANGE SETTINGS TO THE SETTINGS FOR YOUR EXISTING DB
SQL_DATABASE=app
SQL_USER=app_user
SQL_PASSWORD=app_user_password
SQL_HOST=db
SQL_PORT=5432
and .env.prod.db
looks like this:
POSTGRES_USER=app_user
POSTGRES_PASSWORD=app_user_password
POSTGRES_DB=app
Which are virtually the defaults, aside from a new secret key.
Hi,
The date displayed is
YY-MM-DD
Can this be changed to?
YYYY-MM-DD
The full 4-digit year is saved in the database
Hello, i've followed the instructions to set this up on docker. However when i run docker-compose up the error message comes up saying ERROR: Couldn't find env file: /volume1/@docker/test/P4S/src/.env
Is there suppose to be a .env file?
Possibility to automatically delete or shows shows, which are airing on paid content networks like Netflix or Amazon Prime.
Settings will include:
Example: i have both an Amazon Prime Account as well as a Netflix account. Bother are german based accounts. If a show is airing on either of these services, i won't keep them in sonarr or on disk, so i want them automatically deleted.
Things i have to figure out are shows which are still running and are aired much later on these services. Then i want to keep at least the unwatched episodes and the ones, which are not yet on these services.
Since the latest commit https://github.com/faulander/P4S/commit/d1fffa29eabfcf90edcab0df14f0829eb970f6a4 I get the following errors, even after deleting and restarting from the clone
2020-01-21 09:17:08,972 INFO [django.server:157] "GET /settings/ HTTP/1.1" 200 3844
2020-01-21 09:17:11,955 INFO [django.server:157] "GET /shows/ HTTP/1.1" 200 57651
2020-01-21 09:17:12,315 WARNING [django.request:228] Not Found: /static/img/tvmaze.ico
2020-01-21 09:17:12,317 WARNING [django.request:228] Not Found: /static/img/imdb.ico
2020-01-21 09:17:12,317 WARNING [django.server:157] "GET /static/img/tvmaze.ico HTTP/1.1" 404 179
2020-01-21 09:17:12,319 WARNING [django.request:228] Not Found: /static/img/tvrage.ico
2020-01-21 09:17:12,321 WARNING [django.request:228] Not Found: /static/img/thetvdb.ico
2020-01-21 09:17:12,323 WARNING [django.server:157] "GET /static/img/imdb.ico HTTP/1.1" 404 179
2020-01-21 09:17:12,323 WARNING [django.server:157] "GET /static/img/tvrage.ico HTTP/1.1" 404 179
2020-01-21 09:17:12,323 WARNING [django.server:157] "GET /static/img/thetvdb.ico HTTP/1.1" 404 179
In the filetree there are 2 locations of static:
/static
/src/newshows/static
Firefox shows the following request
http://127.0.0.1:8000/static/img/tvrage.ico
Is P4S as is, in docker form, supposed to update the shows that are in development? My instance doesn't seem to update the new shows (some are in there that have gone to production)
Attempting to use P4S in docker, taking the following steps:
$ git clone -b 0.5.0-dev https://github.com/faulander/P4S.git
$ cd P4S/
$ ./setup.sh
$ docker-compose up
And after everything's built and deployed, the web_1 container reports:
web_1 | [2021-02-15 16:19:40 +0000] [8] [ERROR] Exception in worker process
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
web_1 | worker.init_process()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
web_1 | self.load_wsgi()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
web_1 | self.wsgi = self.app.wsgi()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
web_1 | self.callable = self.load()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
web_1 | return self.load_wsgiapp()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
web_1 | return util.import_app(self.app_uri)
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
web_1 | mod = importlib.import_module(module)
web_1 | File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
web_1 | return _bootstrap._gcd_import(name[level:], package, level)
web_1 | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
web_1 | File "<frozen importlib._bootstrap>", line 991, in _find_and_load
web_1 | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
web_1 | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
web_1 | File "<frozen importlib._bootstrap_external>", line 783, in exec_module
web_1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
web_1 | File "/home/app/web/new_shows/wsgi.py", line 16, in <module>
web_1 | application = get_wsgi_application()
web_1 | File "/usr/local/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
web_1 | django.setup(set_prefix=False)
web_1 | File "/usr/local/lib/python3.8/site-packages/django/__init__.py", line 19, in setup
web_1 | configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
web_1 | File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 76, in __getattr__
web_1 | self._setup(name)
web_1 | File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 63, in _setup
web_1 | self._wrapped = Settings(settings_module)
web_1 | File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 142, in __init__
web_1 | mod = importlib.import_module(self.SETTINGS_MODULE)
web_1 | File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
web_1 | return _bootstrap._gcd_import(name[level:], package, level)
web_1 | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
web_1 | File "<frozen importlib._bootstrap>", line 991, in _find_and_load
web_1 | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
web_1 | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
web_1 | File "<frozen importlib._bootstrap_external>", line 783, in exec_module
web_1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
web_1 | File "/home/app/web/new_shows/settings.py", line 30, in <module>
web_1 | p]
web_1 | NameError: name 'p' is not defined
web_1 | [2021-02-15 16:19:40 +0000] [8] [INFO] Worker exiting (pid: 8)
web_1 | [2021-02-15 16:19:40 +0000] [1] [INFO] Shutting down: Master
web_1 | [2021-02-15 16:19:40 +0000] [1] [INFO] Reason: Worker failed to boot.
p4s_web_1 exited with code 3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.