Hellowlol / bw_plex

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

PMS returns None #135

Closed jakewilliami closed 4 years ago

jakewilliami commented 4 years ago

Hi there. I am trying to run bw_plex watch (as the README says it is the most commonly used command, and I think this is what I want to do), but I get the following error:

root@plex:/ # bw_plex -d watch
2020-06-21 06:42:38,928 :: bw_plex :: INFO :: __init__.py:168 :: Using bw_plex version 0.1.1.dev89+g98269f7
2020-06-21 06:42:38,928 :: bw_plex :: INFO :: __init__.py:169 :: default folder set to /root/.config/bw_plex
2020-06-21 06:42:38,929 :: bw_plex :: INFO :: __init__.py:183 :: Log is not sanitized!
2020-06-21 06:42:39,309 :: bw_plex :: INFO :: plex.py:1390 :: Added signal handler.
2020-06-21 06:42:39,310 :: bw_plex :: DEBUG :: misc.py:572 :: Getting hashtable
2020-06-21 06:42:39,346 :: bw_plex :: INFO :: misc.py:658 :: Loading existing files in db
2020-06-21 06:42:40,931 :: bw_plex :: DEBUG :: misc.py:587 :: Files in the hashtable
Traceback (most recent call last):
  File "/usr/local/bin/bw_plex", line 11, in <module>
    load_entry_point('bw-plex', 'console_scripts', 'bw_plex')()
  File "/Plex Media Server/Plug-ins/src/bw-plex/bw_plex/cli.py", line 24, in fake_main
    real_main()
  File "/Plex Media Server/Plug-ins/src/bw-plex/bw_plex/plex.py", line 1401, in real_main
    cli()
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Plex Media Server/Plug-ins/src/bw-plex/bw_plex/plex.py", line 1306, in watch
    click.echo('Watching for media on %s' % PMS.friendlyName)
AttributeError: 'NoneType' object has no attribute 'friendlyName'
Hellowlol commented 4 years ago

You need to edit the config file and add a URL to the server and token or use the command options. See bw_plex watch —help