Hellowlol / bw_plex

binge watching for plex
MIT License
366 stars 23 forks source link

Unable to authorize #8

Closed Rocketcandy closed 6 years ago

Rocketcandy commented 6 years ago
./plex_jump.py update_all_themes
2018-01-02 15:00:46,512 :: ./plex_jump.py :: INFO :: Loading existing files in db
Read fprints for 0 files ( 0 hashes) from /home/inver/bw_plex/hashes.pklz (0.00% dropped)
2018-01-02 15:00:50,921 :: plexapi :: WARNING :: BadRequest (401) unauthorized http://localhost:32400/; <html><head><script>window.location = window.location.href.match(/(^.+\/)[^\/]*$/)[1] + 'web/index.html';</script><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>
Traceback (most recent call last):
  File "./plex_jump.py", line 480, in <module>
    cli()
  File "/home/inver/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/inver/.local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/inver/.local/lib/python2.7/site-packages/click/core.py", line 1063, in invoke
    Command.invoke(self, ctx)
  File "/home/inver/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/inver/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "./plex_jump.py", line 233, in cli
    PMS = PlexServer('', '') # plexapi will pull config file..
  File "/home/inver/.local/lib/python2.7/site-packages/plexapi/server.py", line 101, in __init__
    data = self.query(self.key, timeout=timeout)
  File "/home/inver/.local/lib/python2.7/site-packages/plexapi/server.py", line 345, in query
    raise BadRequest('(%s) %s; %s %s' % (response.status_code, codename, response.url, errtext))
plexapi.exceptions.BadRequest: (401) unauthorized; http://localhost:32400/ <html><head><script>window.location = window.location.href.match(/(^.+\/)[^\/]*$/)[1] + 'web/index.html';</script><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>
Hellowlol commented 6 years ago

You need to add url and token or username, password and servername

Rocketcandy commented 6 years ago

I had the order wrong, got it to work with ./plex_jump.py --url http://192.168.1.X:32400 -t TOKEN update_all_themes