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

Keep getting error in middle of sync #61

Open
vodobaas1 opened this issue Aug 7, 2023 · 9 comments
Open

Keep getting error in middle of sync #61

vodobaas1 opened this issue Aug 7, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@vodobaas1
Copy link

Describe the bug
A clear and concise description of what the bug is.Traceback (most recent call last):
File "/app/./plex-playlist-sync/run.py", line 71, in
spotify_playlist_sync(sp, plex, userInputs)
File "/app/plex-playlist-sync/utils/spotify.py", line 105, in spotify_playlist_sync
update_or_create_plex_playlist(plex, playlist, tracks, userInputs)
File "/app/plex-playlist-sync/utils/plex.py", line 150, in update_or_create_plex_playlist
available_tracks, missing_tracks = _get_available_plex_tracks(plex, tracks)
File "/app/plex-playlist-sync/utils/plex.py", line 66, in _get_available_plex_tracks
search = plex.search(track.title, mediatype="track", limit=5)
File "/usr/local/lib/python3.10/site-packages/plexapi/server.py", line 740, in search
for hub in self.fetchItems(key, Hub):
File "/usr/local/lib/python3.10/site-packages/plexapi/base.py", line 267, in fetchItems
data = self._server.query(ekey, params=url_kw)
File "/usr/local/lib/python3.10/site-packages/plexapi/server.py", line 696, in query
response = method(url, headers=headers, timeout=timeout, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 578, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.1.192', port=32400): Read timed out. (read timeout=30)

To Reproduce
Steps to reproduce the behavior:

  1. Configuration:
  2. Playlist(s) causing the issue:
  3. Song(s) causing the issue:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add logs to help explain your problem.

Additional context
Add any other context about the problem here.

@vodobaas1 vodobaas1 added the bug Something isn't working label Aug 7, 2023
@rnagabhyrava
Copy link
Owner

Looks like plex connection issue. Were you able to access your plex on this machine at that ip address and host?

@vodobaas1
Copy link
Author

vodobaas1 commented Aug 7, 2023

Yes I'm able to connect to my plex via that ip address and I was able to ping my plex server via console.

This is run in the plexplaylistsync console:
PING 192.168.1.192:32400 (192.168.1.192): 56 data bytes
64 bytes from 192.168.1.192: seq=0 ttl=64 time=0.057 ms
64 bytes from 192.168.1.192: seq=1 ttl=64 time=0.058 ms
64 bytes from 192.168.1.192: seq=2 ttl=64 time=0.066 ms

@rnagabhyrava
Copy link
Owner

  1. Did it work before and started throwing all of a sudden?

  2. If it worked before and just started throwing issues you may try restarting the server/container to see if that fixes the issue.

  3. There is an old issue on plex api (which this project uses) about the timeout. It has since been increased to 30 seconds. You may try increasing that to

pkkid/python-plexapi#57

@vodobaas1
Copy link
Author

Yes it just started throwing all of a sudden.
I've restarted and it was still throwing the error.
Ah, I will change the timeout and see if that correct it.

Thanks!

@vodobaas1
Copy link
Author

So I changed it to 30 seconds and it still times out but not as often it appears. I will continue to monitor it and see if it persists. It's odd since I can ping with no problem while it times out.

@rnagabhyrava
Copy link
Owner

I believe that default is now 30 seconds try increasing it to a minute or go crazy and see if that fixes the issue. Mind if I ask you what server you're using? CPU/clock speed.

@vodobaas1
Copy link
Author

Not at all, I'm using a i7-13700K @ 3400 MHz on Unraid with 64GB RAM. I'll change it to 60 seconds and see how that works. Thanks again.

@vodobaas1
Copy link
Author

So I still haven't been able to change the timeout length. I've been using PLEXAPI_plexapi_timeout = 60 and it still does 30 seconds. I'm obviously missing something. I have been using https://python-plexapi.readthedocs.io/en/latest/configuration.html for refrence.

@borja190898
Copy link

Do you find any solution? I have the same problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants