Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrobbling failing sometimes due to MaxRetryError #600

Open
darkcoderrises opened this issue Aug 6, 2021 · 4 comments
Open

Scrobbling failing sometimes due to MaxRetryError #600

darkcoderrises opened this issue Aug 6, 2021 · 4 comments

Comments

@darkcoderrises
Copy link

For the past month or so, scrobbling has been really random for me. If I am binging a series, only some of the episodes would get marked. I looked at the logs and found this error:

2021-08-07 00:27:15,439 - plugin.managers.action           (7f2c5342fb38) :  ERROR (plugin.managers.action:161) - Unable to send action u'scrobble/pause': ConnectionError(MaxRetryError("HTTPSConnectionPool(host='api.trakt.tv', port=443): Max retries exceeded with url: /scrobble/pause (Caused by ProtocolError('Connection aborted.'))"),)
Traceback (most recent call last):
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/action.py", line 159, in process
    result = cls.send(action, Trakt[interface][method], request)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/managers/action.py", line 222, in send
    return func(**request)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 36, in wrap
    return func(*args, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 20, in wrap
    return func(*args, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/scrobble.py", line 333, in pause
    **kwargs
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 36, in wrap
    return func(*args, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/base/__init__.py", line 20, in wrap
    return func(*args, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/interfaces/scrobble.py", line 128, in action
    'validate_token'
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 152, in post
    return self.request('POST', path, params, data, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 107, in request
    return self.send(prepared)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/trakt/core/http.py", line 125, in send
    response = self.session.send(request, timeout=timeout)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: MaxRetryError: HTTPSConnectionPool(host='api.trakt.tv', port=443): Max retries exceeded with url: /scrobble/pause (Caused by ProtocolError('Connection aborted.'))

How should this error be fixed? Can we increase the max retries? Is this something that trakt is enforcing?

@CrypticOne
Copy link

CrypticOne commented Aug 6, 2021

I am getting this too but only on my QNAP install. No errors on Synology that it syncs played items with. Sadly, This project is mostly abandoned at this point. Last I searched it was still the best tool for my usage case. I may try to look at the code but it is pretty large.

I find that stopping and starting Plex might reset the issue at least temporarily.

I am not sure your usage case but I found some projects that might work for me.

https://github.com/Fmstrat/plex-cluster From the coder of plex-db-sync

https://github.com/speijnik/plex-watched-sync

This one works with trak and seems to be pretty active. https://github.com/twolaw/PlexTraktSync

@darkcoderrises
Copy link
Author

Thanks. So I wrote a retry counter in the code, and it worked. I will send a pull request.

@CrypticOne
Copy link

Nice!

@darkcoderrises
Copy link
Author

#602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants