{"action":"created","issue":{"url":"https://api.github.com/repos/pkkid/python-plexapi/issues/244","repository_url":"https://api.github.com/repos/pkkid/python-plexapi","labels_url":"https://api.github.com/repos/pkkid/python-plexapi/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/pkkid/python-plexapi/issues/244/comments","events_url":"https://api.github.com/repos/pkkid/python-plexapi/issues/244/events","html_url":"https://github.com/pkkid/python-plexapi/issues/244","id":285652346,"node_id":"MDU6SXNzdWUyODU2NTIzNDY=","number":244,"title":"Cannot control client : 406 error","user":{"login":"niko34","id":335720,"node_id":"MDQ6VXNlcjMzNTcyMA==","avatar_url":"https://avatars0.githubusercontent.com/u/335720?v=4","gravatar_id":"","url":"https://api.github.com/users/niko34","html_url":"https://github.com/niko34","followers_url":"https://api.github.com/users/niko34/followers","following_url":"https://api.github.com/users/niko34/following{/other_user}","gists_url":"https://api.github.com/users/niko34/gists{/gist_id}","starred_url":"https://api.github.com/users/niko34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niko34/subscriptions","organizations_url":"https://api.github.com/users/niko34/orgs","repos_url":"https://api.github.com/users/niko34/repos","events_url":"https://api.github.com/users/niko34/events{/privacy}","received_events_url":"https://api.github.com/users/niko34/received_events","type":"User","site_admin":false},"labels":[{"id":161472136,"node_id":"MDU6TGFiZWwxNjE0NzIxMzY=","url":"https://api.github.com/repos/pkkid/python-plexapi/labels/bug","name":"bug","color":"d93f0b","default":true}],"state":"open","locked":false,"assignee":{"login":"Hellowlol","id":1214134,"node_id":"MDQ6VXNlcjEyMTQxMzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1214134?v=4","gravatar_id":"","url":"https://api.github.com/users/Hellowlol","html_url":"https://github.com/Hellowlol","followers_url":"https://api.github.com/users/Hellowlol/followers","following_url":"https://api.github.com/users/Hellowlol/following{/other_user}","gists_url":"https://api.github.com/users/Hellowlol/gists{/gist_id}","starred_url":"https://api.github.com/users/Hellowlol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hellowlol/subscriptions","organizations_url":"https://api.github.com/users/Hellowlol/orgs","repos_url":"https://api.github.com/users/Hellowlol/repos","events_url":"https://api.github.com/users/Hellowlol/events{/privacy}","received_events_url":"https://api.github.com/users/Hellowlol/received_events","type":"User","site_admin":false},"assignees":[{"login":"Hellowlol","id":1214134,"node_id":"MDQ6VXNlcjEyMTQxMzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1214134?v=4","gravatar_id":"","url":"https://api.github.com/users/Hellowlol","html_url":"https://github.com/Hellowlol","followers_url":"https://api.github.com/users/Hellowlol/followers","following_url":"https://api.github.com/users/Hellowlol/following{/other_user}","gists_url":"https://api.github.com/users/Hellowlol/gists{/gist_id}","starred_url":"https://api.github.com/users/Hellowlol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hellowlol/subscriptions","organizations_url":"https://api.github.com/users/Hellowlol/orgs","repos_url":"https://api.github.com/users/Hellowlol/repos","events_url":"https://api.github.com/users/Hellowlol/events{/privacy}","received_events_url":"https://api.github.com/users/Hellowlol/received_events","type":"User","site_admin":false}],"milestone":null,"comments":14,"created_at":"2018-01-03T10:48:21Z","updated_at":"2018-09-20T05:59:20Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\ni try to control a plex client (PMP on a RPI) using python-plexapi.\r\n\r\nI 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).\r\n\r\nI made a small python script, where the baseurl is the url of my plex server.\r\nWhen i print the clients list, i can see my client with the title \"PlexMediaPlayer\". \r\nAs a result of this script, i always get a 406 error code, with this trace :\r\n```\r\nPlexMediaPlayer\r\nTraceback (most recent call last):\r\n  File \"./test.py\", line 16, in <module>\r\n    client.goToHome()\r\n  File \"/usr/local/lib/python2.7/dist-packages/plexapi/client.py\", line 216, in goToHome\r\n    self.sendCommand('navigation/home')\r\n  File \"/usr/local/lib/python2.7/dist-packages/plexapi/client.py\", line 192, in sendCommand\r\n    return self.query(key, headers=headers)\r\n  File \"/usr/local/lib/python2.7/dist-packages/plexapi/client.py\", line 164, in query\r\n    raise BadRequest('(%s) %s; %s %s' % (response.status_code, codename, response.url, errtext))\r\nplexapi.exceptions.BadRequest: (406) not_acceptable; http://10.0.1.35:32433/player/navigation/home?commandID=1&X-Plex-Token=[MY TOKEN]\r\n```\r\n\r\nIs there any step i did forget to control my client ?\r\n(i can navigate into my library thru the PlexServer object, list all my movies...)\r\n\r\n```\r\n#!/usr/bin/env python3\r\n\r\nfrom plexapi.server import PlexServer\r\n\r\nbaseurl = 'http://10.0.1.41:32400'\r\ntoken = '[MY TOKEN]'\r\nplex = PlexServer(baseurl, token)\r\n\r\nfor client in plex.clients():\r\n    print(client.title)\r\n\r\nclient = plex.client(\"PlexMediaPlayer\")\r\n\r\nclient.connect()\r\n\r\nclient.goToHome()\r\n```\r\n  "},"comment":{"url":"https://api.github.com/repos/pkkid/python-plexapi/issues/comments/423049746","html_url":"https://github.com/pkkid/python-plexapi/issues/244#issuecomment-423049746","issue_url":"https://api.github.com/repos/pkkid/python-plexapi/issues/244","id":423049746,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzA0OTc0Ng==","user":{"login":"realfire23","id":26832574,"node_id":"MDQ6VXNlcjI2ODMyNTc0","avatar_url":"https://avatars3.githubusercontent.com/u/26832574?v=4","gravatar_id":"","url":"https://api.github.com/users/realfire23","html_url":"https://github.com/realfire23","followers_url":"https://api.github.com/users/realfire23/followers","following_url":"https://api.github.com/users/realfire23/following{/other_user}","gists_url":"https://api.github.com/users/realfire23/gists{/gist_id}","starred_url":"https://api.github.com/users/realfire23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realfire23/subscriptions","organizations_url":"https://api.github.com/users/realfire23/orgs","repos_url":"https://api.github.com/users/realfire23/repos","events_url":"https://api.github.com/users/realfire23/events{/privacy}","received_events_url":"https://api.github.com/users/realfire23/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T05:59:20Z","updated_at":"2018-09-20T05:59:20Z","author_association":"NONE","body":"any news out there ? iam getting the same error.\r\n\r\nAlso Iam unable to cast videos.\r\n\r\nProblem appears when trying to cast on windows plex media player (which is indeed crucial for me, \r\nbecause of the orientation of screen.\r\n"}}
{"actor":{"display_login":"realfire23"}}