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
Cannot control client : 406 error #244
Comments
What happens if you pass the url in your browser, are there any error message from pmp? |
I only get a generic message in chrome : "Failed to load resource: the server responded with a status of 406 (Not Acceptable)". |
Thanks, ill check. |
The |
@Hellowlol Would it make sense for us to also log the response body when we a bad request (400 level)? As you mentioned that's often where the useful error messages are sitting. |
FWIW 406 = Not Acceptable |
Yes. I think so. |
One of our users has reported the same issue. You might want to check out our ticket incase it provides any more detail |
I know notice that I posted in the home assistant issue. Anyway pmp seems to require a timeline call every 90 sec or it throws a 406 on the command. You can fix this by using client.timeline() |
Just to answer your semi-rhetorical question in the HomeAssistant I would think it best handled in the at the API level if it can be done async. If not and it's going to block then it should be handled by the implementor. |
Nothing about this api is asynchronous. Anyway I think we should handle this this is the client class. |
If anybody want to send a pr please do if not I’ll fix this after I’m done with bw_plex |
Any ETA on a fix for this? Thanks! |
@doodah33 Today :) hopefully ;) |
any news out there ? iam getting the same error. Also Iam unable to cast videos. Problem appears when trying to cast on windows plex media player (which is indeed crucial for me, |
I have tried to add a fix in https://github.com/pkkid/python-plexapi/tree/pmp_406 Can anybody test and confirm? |
I just gave it go by copying client.py into my Home Assistant deps. The 406 error is gone, and I'm able to control the Plex Media Player on RPi. Nice work! |
@beville you mind trying different actions like pause, stop, play, vol up down etc? |
Yes, I tested play, pause, stop, volume up and down via the HA control, and all worked. In addition, I used the test script from above at #244 (comment), and the goToHome function seemed to work. Since this problem seems to affect PMP regardless of platform, you should be able to easily verify yourself against any desktop version of PMP. I just started a Linux version of PMP (https://knapsu.eu/plex/), and was able to pause/play with a script using your fixed version of client.py. |
Thanks for confirming. I’ll see if I can get this merged later. |
Closing this as the pr is merged in master. |
While researching some details around |
Hi,
i try to control a plex client (PMP on a RPI) using python-plexapi.
I get a token after using plex-listtokens.py. The tool list many object : Ressources, Devices and one client (my PMP RPI). My Plex Media Server (Ressource) has the same token than my Plex Media Player (Client).
I made a small python script, where the baseurl is the url of my plex server.
When i print the clients list, i can see my client with the title "PlexMediaPlayer".
As a result of this script, i always get a 406 error code, with this trace :
Is there any step i did forget to control my client ?
(i can navigate into my library thru the PlexServer object, list all my movies...)
The text was updated successfully, but these errors were encountered: