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

Something went wrong: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 0x1051a6a70>) #25

Open
fkick opened this issue Oct 22, 2016 · 2 comments

Comments

@fkick
Copy link

fkick commented Oct 22, 2016

Hi,

I'm getting the below error now when I attempt to use PlexDownloader. This occurs with both shared and owned servers, both local and remote. Currently I'm running Plex Server 1.2.2.2857 and Mac OS Sierra

Something went wrong: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 0x1051a6a70>)
Traceback (most recent call last):
  File "PlexDownloader-master /plexdl.py", line 1062, in <module>
    x.search()
  File "PlexDownloader-master /plexdl.py", line 201, in search
    xmldoc = minidom.parse(urllib.urlopen(constructPlexUrl("/library/sections/"+unicode(self.plexid)+"/all")))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 87, in urlopen
    return opener.open(url)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 213, in open
    return getattr(self, name)(url)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 364, in open_http
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 377, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 689, in http_error_401
    errcode, errmsg, headers)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 386, in http_error_default
    raise IOError, ('http error', errcode, errmsg, headers)
IOError: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 0x1051a6a70>)

Plex Download failed at 2016-10-21 18:18:20
Retrying in 600 Seconds...

@Jonher937
Copy link

I had the same problem but it works if you enter the token manually to "token.txt". You can search on the Plex helpcenter for "Finding an authentication token / X-Plex-Token"

I used the network debugger in Chrome to get the token, looks like you can browse to the web page and when browsing for servers you enter this in the Chrome developer console: window.PLEXWEB.myPlexAccessToken

That should give you your token, not sure how to get the shared one as easy.

Sperryfreak01 pushed a commit to Sperryfreak01/PlexDownloader that referenced this issue Mar 15, 2017
@lumpyrabbit
Copy link

A somewhat quick way to find the X-Plex-Token

In your browser, open the Plex Shared Libary you want to use. Then, use your browser's Dev Tools (in Chrome: More Tools -> Dev Tools and FF it's Web Developer Tools) and use the Network tool. The Request URL output string will give you the IP of the shared server and the Token.

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

4 participants
@Jonher937 @fkick @lumpyrabbit and others