pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.81k stars 278 forks source link

[APP SUBMITTED]: requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token #8410

Closed XxUnkn0wnxX closed 3 years ago

XxUnkn0wnxX commented 4 years ago

INFO

Python Version: 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)] Operating System: macOS-10.15.6-x86_64-i386-64bit Locale: UTF-8 Branch: develop Database: 44.16 Commit: pymedusa/Medusa@7248052dda8eb6c9c39d717613ce24faf1643d91 Link to Log: https://gist.github.com/bf14ced83976711a2d0fbdf2b29069dc

ERROR

2020-08-29 03:50:52 ERROR    Thread_1 :: [7248052] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
  File "/Users/ovidijus/Apps/Medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/Users/ovidijus/Apps/Medusa/ext/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/users/settings

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/ovidijus/Apps/Medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/Users/ovidijus/Apps/Medusa/ext/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

XxUnkn0wnxX commented 4 years ago

lately trakt as been doing maintenance on their site/api they may have changed something. getting pin & authorising is fine but test always fails. full log: application.log.zip

p0psicles commented 4 years ago

They have been warning that they would deprecate pin auth. Could be they switched

DrakeJones commented 4 years ago

INFO

Python Version: 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] Operating System: Windows-7-6.1.7601-SP1 Locale: cp1252 Branch: master Database: 44.16 Commit: pymedusa/Medusa@20915b56d64dc7522e484f326d9cfe7449a73193 Link to Log: No Log available

ERROR

2020-09-03 16:47:34 ERROR    TORNADO :: [20915b5] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
  File "C:\Medusa\Medusa\lib\traktor\trakt.py", line 118, in request
    resp.raise_for_status()
  File "C:\Medusa\Medusa\ext\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Medusa\Medusa\lib\traktor\trakt.py", line 118, in request
    resp.raise_for_status()
  File "C:\Medusa\Medusa\ext\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

DrakeJones commented 4 years ago

INFO

Python Version: 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] Operating System: Windows-7-6.1.7601-SP1 Locale: cp1252 Branch: master Database: 44.16 Commit: pymedusa/Medusa@20915b56d64dc7522e484f326d9cfe7449a73193 Link to Log: No Log available

ERROR

2020-09-04 05:06:45 ERROR    TORNADO :: [20915b5] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
  File "C:\Medusa\Medusa\lib\traktor\trakt.py", line 118, in request
    resp.raise_for_status()
  File "C:\Medusa\Medusa\ext\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Medusa\Medusa\lib\traktor\trakt.py", line 118, in request
    resp.raise_for_status()
  File "C:\Medusa\Medusa\ext\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

DrakeJones commented 4 years ago

INFO

Python Version: 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] Operating System: Windows-7-6.1.7601-SP1 Locale: cp1252 Branch: master Database: 44.16 Commit: pymedusa/Medusa@708c2e9351e61b3f96345ab013f52e83b5a474b5 Link to Log: No Log available

ERROR

2020-09-07 20:26:10 ERROR    TORNADO :: [708c2e9] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
  File "C:\Medusa\Medusa\lib\traktor\trakt.py", line 118, in request
    resp.raise_for_status()
  File "C:\Medusa\Medusa\ext\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Medusa\Medusa\lib\traktor\trakt.py", line 118, in request
    resp.raise_for_status()
  File "C:\Medusa\Medusa\ext\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

brandnewant commented 4 years ago

INFO

Python Version: 3.7.7 (default, Aug 18 2020, 20:42:48) [GCC 4.9.3 20150311 (prerelease)] Operating System: Linux-4.4.59+-x86_64-with-glibc2.2.5 Locale: UTF-8 Branch: master Database: 44.16 Commit: pymedusa/Medusa@b352bb6924afcdfafce176a540d53ce405ca1312 Link to Log: https://gist.github.com/88909f89cbe8434a3e2ff86e608527e5

ERROR

2020-09-10 17:53:21 ERROR    POSTPROCESSOR :: [b352bb6] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

brandnewant commented 4 years ago

INFO

Python Version: 3.7.7 (default, Aug 18 2020, 20:42:48) [GCC 4.9.3 20150311 (prerelease)] Operating System: Linux-4.4.59+-x86_64-with-glibc2.2.5 Locale: UTF-8 Branch: master Database: 44.16 Commit: pymedusa/Medusa@b352bb6924afcdfafce176a540d53ce405ca1312 Link to Log: https://gist.github.com/ff85f9101dbe59600a2588f448efdc7a

ERROR

2020-09-11 23:54:31 ERROR    POSTPROCESSOR :: [b352bb6] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

DrakeJones commented 4 years ago

INFO

Python Version: 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] Operating System: Windows-7-6.1.7601-SP1 Locale: cp1252 Branch: master Database: 44.16 Commit: pymedusa/Medusa@b352bb6924afcdfafce176a540d53ce405ca1312 Link to Log: No Log available

ERROR

2020-09-16 17:01:29 ERROR    Thread_25 :: [b352bb6] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
  File "C:\Medusa\Medusa\lib\traktor\trakt.py", line 118, in request
    resp.raise_for_status()
  File "C:\Medusa\Medusa\ext\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Medusa\Medusa\lib\traktor\trakt.py", line 118, in request
    resp.raise_for_status()
  File "C:\Medusa\Medusa\ext\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

duramato commented 4 years ago

INFO

Python Version: 3.8.5 (default, Aug 2 2020, 15:09:07) [GCC 9.3.0] Operating System: Linux-4.9.35-v7+-armv7l-with-glibc2.29 Locale: UTF-8 Branch: develop Database: 44.16 Commit: pymedusa/Medusa@efadfe98f4e93864eb31c16724ed57c0a6319707 Link to Log: https://gist.github.com/6718930997f4c5db00e839f40f8a3ad4

ERROR

2020-09-17 14:06:44 ERROR    Thread_0 :: [efadfe9] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

brandnewant commented 4 years ago

INFO

Python Version: 3.7.7 (default, Sep 19 2020, 16:20:36) [GCC 4.9.3 20150311 (prerelease)] Operating System: Linux-4.4.59+-x86_64-with-glibc2.2.5 Locale: UTF-8 Branch: master Database: 44.16 Commit: pymedusa/Medusa@b352bb6924afcdfafce176a540d53ce405ca1312 Link to Log: https://gist.github.com/5f1c775f93829bd91fafab9db9924bc4

ERROR

2020-09-25 17:53:25 ERROR    POSTPROCESSOR :: [b352bb6] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

brandnewant commented 4 years ago

INFO

Python Version: 3.7.7 (default, Sep 19 2020, 16:20:36) [GCC 4.9.3 20150311 (prerelease)] Operating System: Linux-4.4.59+-x86_64-with-glibc2.2.5 Locale: UTF-8 Branch: master Database: 44.16 Commit: pymedusa/Medusa@b352bb6924afcdfafce176a540d53ce405ca1312 Link to Log: https://gist.github.com/71ac63b36c72dbb6eb5f5d07fda71d50

ERROR

2020-09-27 10:56:05 ERROR    POSTPROCESSOR :: [b352bb6] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/collection

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

PrzemekSkw commented 4 years ago

INFO

Python Version: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] Operating System: Linux-5.4.0-51-generic-x86_64-with-glibc2.29 Locale: UTF-8 Branch: master Database: 44.17 Commit: pymedusa/Medusa@b352bb6924afcdfafce176a540d53ce405ca1312 Link to Log: https://gist.github.com/434482d52c180b68d6acbc4d176a5ab0

ERROR

2020-10-29 17:07:10 ERROR    Thread_0 :: [b352bb6] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
  File "/opt/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/opt/medusa/ext/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/users/settings

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/opt/medusa/ext/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

PrzemekSkw commented 4 years ago

@p0psicles Hi, I still getting that error. I cannot add shows from my Trakt watchlist to Medusa but I see shows added from Medusa in Trakt. Is there a way to fix this or I should write to Trakt support? Regards.

GG-76 commented 4 years ago

Sometimes I manage to authorize the tract in Medusa correctly without this error, but still the synchronization request always ends with an error - TRAKTCHECKER :: [552f119] Unable to retrieve episodes from Trakt watchlist. Error: UnavailableException ("Trakt may have some issues and it's unavailable. Try again later please"). I don't know what's wrong. Nothing syncs in both directions.

PrzemekSkw commented 3 years ago

@Kravatak76 @p0psicles Hi, I also have succed yesterday to connect trakt with medusa when I generate new PIN but nothing sync from trakt. I have also problem with Trakt and Emby and there was a solution to delete trakt.xml file. Meybe here also something like that will help?

jeffski10 commented 3 years ago

I've managed to fix my instance of this by starting a docker image of SR, use that to authorise and then copy the tokens from the config.ini into the medusa config.ini. After that its syncing and connecting fine.

PrzemekSkw commented 3 years ago

@jeffski10 Hi, what do You mean docker image of SR?

p0psicles commented 3 years ago

I'll finish the trakt oauth PR this week. That should fix all this. https://github.com/pymedusa/Medusa/pull/4906

p0psicles commented 3 years ago

I refactored the trakt implementation, also using a new trakt library and authentication method. Looking for testers for this branch in pull request: #8916. You'll need to know howto checkout a branch.

PrzemekSkw commented 3 years ago

@p0psicles Hi, I choose develop branch and one more time authorize trakt but don't work either. Do I have to do something more? regards, Przemek

jeffski10 commented 3 years ago

I checked out that Branch and ran locally. Connects fine with no errors. The add shows dialog is working, adds the shows back to the watchlist. Only thing the force sync button doesn't seem to do anything. Enabled debug and I see nothing in the log.

p0psicles commented 3 years ago

@PrzemekSkw it's not in develop yet @jeffski10 I did test that myself. Maybe the traktchecker thread crashed. No errors?

jeffski10 commented 3 years ago

Maybe it had. I restarted the app again and then tried and the sync worked. So maybe a blip. All seems good then to me.

p0psicles commented 3 years ago

Could you keep an eye out. En try the sync button again in 24 hours?

PrzemekSkw commented 3 years ago

OK I will try.

wt., 29 gru 2020, 16:23 użytkownik p0ps notifications@github.com napisał:

Could you keep an eye out. En try the sync button again in 24 hours?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pymedusa/Medusa/issues/8410#issuecomment-752119684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGANHFDZ7DQGYA6RH6ZR3STSXHX7LANCNFSM4QOL2UVA .

PrzemekSkw commented 3 years ago

@p0psicles Hi, today I try to choose develop branch but still have error compare db versions.

2020-12-29 23:56:53 WARNING  SEARCHQUEUE-DAILY-SEARCH :: [Zooqle] :: [] DB error: OperationalError('database is locked')
2020-12-29 23:55:46 WARNING  SEARCHQUEUE-DAILY-SEARCH :: [BTDB] :: [] DB error: OperationalError('database is locked')
2020-12-29 23:54:20 WARNING  SEARCHQUEUE-DAILY-SEARCH :: [LimeTorrents] :: [] DB error: OperationalError('database is locked')
2020-12-29 23:53:01 WARNING  SEARCHQUEUE-DAILY-SEARCH :: [Eztv] :: [] DB error: OperationalError('database is locked')
2020-12-29 23:51:41 WARNING  SEARCHQUEUE-DAILY-SEARCH :: [1337x] :: [] DB error: OperationalError('database is locked')
2020-12-29 23:42:35 WARNING  SEARCHQUEUE-DAILY-SEARCH :: [Torrentz2] :: [] DB error: OperationalError('database is locked')
2020-12-29 23:39:37 WARNING  SEARCHQUEUE-DAILY-SEARCH :: [TorrentGalaxy] :: [] DB error: OperationalError('database is locked')

2020-12-29 23:23:52 WARNING  Thread_5 :: [] Checkout branch couldn't compare DB version.

and errors:

2020-12-29 23:44:19 ERROR    SEARCHQUEUE-DAILY-SEARCH :: [Zooqle] :: [] DailySearchQueueItem Exception, error: TypeError("'NoneType' object is not iterable")
Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/medusa/search/queue.py", line 297, in run
    found_results = search_for_needed_episodes(self.scheduler_start_time, force=self.force)
  File "/mnt/dietpi_userdata/medusa/medusa/search/core.py", line 535, in search_for_needed_episodes
    found_results = cur_provider.cache.find_needed_episodes(episodes)
  File "/mnt/dietpi_userdata/medusa/medusa/tv/cache.py", line 500, in find_needed_episodes
    cache_results = self.find_episodes(episodes)
  File "/mnt/dietpi_userdata/medusa/medusa/tv/cache.py", line 595, in find_episodes
    sql_results = list(itertools.chain(*sql_results))
TypeError: 'NoneType' object is not iterable
2020-12-29 23:39:45 ERROR    SEARCHQUEUE-DAILY-SEARCH :: [TorrentGalaxy] :: [] DailySearchQueueItem Exception, error: TypeError("'NoneType' object is not iterable")
Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/medusa/search/queue.py", line 297, in run
    found_results = search_for_needed_episodes(self.scheduler_start_time, force=self.force)
  File "/mnt/dietpi_userdata/medusa/medusa/search/core.py", line 535, in search_for_needed_episodes
    found_results = cur_provider.cache.find_needed_episodes(episodes)
  File "/mnt/dietpi_userdata/medusa/medusa/tv/cache.py", line 500, in find_needed_episodes
    cache_results = self.find_episodes(episodes)
  File "/mnt/dietpi_userdata/medusa/medusa/tv/cache.py", line 595, in find_episodes
    sql_results = list(itertools.chain(*sql_results))
TypeError: 'NoneType' object is not iterable
p0psicles commented 3 years ago

Db is locked. Maybe opened the db with sqlite editor. Or running two medusa processes? Else restart system

PrzemekSkw commented 3 years ago

I have second Medusa on Ubuntu laptop. I restore backup on Dietpi(Rpi2) from laptop.

jeffski10 commented 3 years ago

@p0psicles Have left it 24 hrs and the connection remained.

I replicated the sync issue by starting again. It seems when you get the token and do the test to prove connection and then try the sync the traktchecker process is not being enabled. If I restart the app it enables it and then the button works fine.

PrzemekSkw commented 3 years ago

@p0psicles I don't have those errors with db locked but on develop branch I cannot upgrade and trakt sync still don't work.

p0psicles commented 3 years ago

Try the upgrade and collect a debug, log of it

PrzemekSkw commented 3 years ago

@p0psicles Hi, I see I'm on last develop release but still have trakt errors:


2020-12-30 20:38:05 ERROR    POSTPROCESSOR :: [] Unknown Trakt request exception. Error: 429
Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/mnt/dietpi_userdata/medusa/ext/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.trakt.tv/sync/watchlist/remove

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/mnt/dietpi_userdata/medusa/ext/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.trakt.tv/sync/watchlist/remove

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/mnt/dietpi_userdata/medusa/ext/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.trakt.tv/sync/watchlist/remove

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/mnt/dietpi_userdata/medusa/ext/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.trakt.tv/sync/watchlist/remove

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/mnt/dietpi_userdata/medusa/ext/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/watchlist/remove

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/mnt/dietpi_userdata/medusa/ext/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://api.trakt.tv/sync/watchlist/remove
2020-12-30 20:34:24 ERROR    POSTPROCESSOR :: [] Unknown Trakt request exception. Error: 400
Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/mnt/dietpi_userdata/medusa/ext/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.trakt.tv/sync/watchlist/remove

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/medusa/lib/traktor/trakt.py", line 118, in request
    resp.raise_for_status()
  File "/mnt/dietpi_userdata/medusa/ext/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trakt.tv/oauth/token

Now when I try to generate new PIN I have bad gateway error on small window instead of PIN.

Regards, Przemek

medariox commented 3 years ago

@PrzemekSkw it's not in develop yet One more time just because it's fun.

p0psicles commented 3 years ago

@jeffski10 it should now start the trakt checker thread, after you save your settings. So just testing is not enough. But, you don't need to restart medusa to have it take effect.

jeffski10 commented 3 years ago

@p0psicles All good - just tested with the authenticated instance and then started again from scratch and in both cases the sync starts.

PrzemekSkw commented 3 years ago

@PrzemekSkw it's not in develop yet One more time just because it's fun.

Hi, I don't understand. Can You explain how to test it?

p0psicles commented 3 years ago

Think its merged to develop today or tomorrow

p0psicles commented 3 years ago

Merged to develop. Pls test. And let me know if there are still issues.

PrzemekSkw commented 3 years ago

@p0psicles Hi, I test now and still have error 400 on develop. Maybe I have on Dietpi?

Branch: develop
Commit: Unknown
Version: 0.5.1
Database: 44.17
-- | --
Python Version: | 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
SSL Version: | OpenSSL 1.1.1d 10 Sep 2019
OS: | Linux-5.4.79-v7+-armv7l-with-debian-10.7

Regards.

p0psicles commented 3 years ago

My guess is that your not on the last commit. In command prompt nvigate to medusa dir. Run: git fetch origin git checkout develop git pull Now restart medusa

PrzemekSkw commented 3 years ago

@p0psicles I find that there's something strange on Dietpi. I have Medusa working but when I check in ssh: INFO ] DietPi-Services | medusa inactive (dead) since Sat 2021-01-02 20:26:27 CET; 16h ago

p0psicles commented 3 years ago

Probably the systemd has lost contact with the PID. Restarting the system should help that. Maybe double check your init script

PrzemekSkw commented 3 years ago

@p0psicles I try Your commands but failed:

root@DietPi:/mnt/dietpi_userdata# cd medusa/
root@DietPi:/mnt/dietpi_userdata/medusa# ls
CHANGELOG.md     cache-20201228_210255         config.ini.bak-20201228_210252  hooks                main.db.v44.11  main.db.v44.5  requirements.txt   tox.ini
CONTRIBUTING.md  cache-20201228_213024         config.ini.bak-20201228_213020  lib              main.db.v44.12  main.db.v44.6  runscripts         yarn.lock
COPYING.txt  cache.db              dredd                   main.db              main.db.v44.13  main.db.v44.7  setup.cfg
Dockerfile   cache.db-journal          ext                 main.db.bak-20201228_210252  main.db.v44.14  main.db.v44.8  setup.py
Logs         cache.db.bak-20201228_210252  ext3                main.db.bak-20201228_213020  main.db.v44.15  main.db.v44.9  start.py
MANIFEST.in  cache.db.bak-20201228_213020  failed.db               main.db.v42          main.db.v44.16  medusa     test_requirements.txt
SickBeard.py     cache.db.v1.None          failed.db.bak-20201228_210252   main.db.v43.1            main.db.v44.2   package.json   tests
backup       cache.db.v2.None          failed.db.bak-20201228_213020   main.db.v44.1            main.db.v44.3   readme.md      themes
cache        config.ini            failed.db.v2.None           main.db.v44.10           main.db.v44.4   renovate.json  themes-default
root@DietPi:/mnt/dietpi_userdata/medusa# git fetch origin
fatal: not a git repository (or any of the parent directories): .git
p0psicles commented 3 years ago

Your in the program data folder. Make sure you in the program folder

Skip that. Don't know what's up. But it's not installed through git

PrzemekSkw commented 3 years ago

@p0psicles I reinstall Medusa but don't help. In Dietpi when reinstalling it always take newest version from github, but maybe not with develop branch. I think I will have to wait for upgrade for master. Thank You for Your help. Regards.