Hellowlol / bw_plex

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

Can't start bw_plex watch, keeps erroring out. #116

Closed Cookie-Monster-Coder closed 4 years ago

Cookie-Monster-Coder commented 4 years ago

`USER ~ $ bw_plex watch 2020-01-12 22:01:25,717 :: bw_plex :: INFO :: init.py:172 :: Using bw_plex version 0.1.1.dev76+gd2ce7ed 2020-01-12 22:01:25,717 :: bw_plex :: INFO :: init.py:173 :: default folder set to /home/USER/.config/bw_plex 2020-01-12 22:01:25,765 :: bw_plex :: WARNING :: audio.py:14 :: Failed to import speech_recognition this is required to check for recaps in audio. Install the package using pip install bw_plex[audio] or bw_plex[all] 2020-01-12 22:01:26,170 :: bw_plex :: WARNING :: credits.py:17 :: Scanning for credits is not supported. Install the package with pip install bw_plex[all] or bw_plex[video] 2020-01-12 22:01:26,171 :: bw_plex :: WARNING :: credits.py:24 :: Extracting text from images is not supported. Install the package with pip install bw_plex[all] or bw_plex[video] Traceback (most recent call last): File "/mnt/mpathu/USER/src/bw-plex/bw_plex/credits.py", line 28, in import Image ModuleNotFoundError: No module named 'Image'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/USER/bin/bw_plex", line 11, in load_entry_point('bw-plex', 'console_scripts', 'bw_plex')() File "/mnt/mpathu/USER/src/bw-plex/bw_plex/cli.py", line 23, in fake_main from bw_plex.plex import real_main File "/mnt/mpathu/USER/src/bw-plex/bw_plex/plex.py", line 28, in from bw_plex.credits import find_credits File "/mnt/mpathu/USER/src/bw-plex/bw_plex/credits.py", line 30, in from PIL import Image ModuleNotFoundError: No module named 'PIL'

When I do pip install bw_plex[all] it gives me errors like:

`Building wheels for collected packages: pocketsphinx Building wheel for pocketsphinx (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/USER/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/mpathu/USER/.tmp/pip-install-9wprn2yf/pocketsphinx/setup.py'"'"'; file='"'"'/mnt/mpathu/USER/.tmp/pip-install-9wprn2yf/pocketsphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /mnt/mpathu/USER/.tmp/pip-wheel-2q4ow4y6 --python-tag cp36 cwd: /mnt/mpathu/USER/.tmp/pip-install-9wprn2yf/pocketsphinx/ Complete output (7 lines): running bdist_wheel running build_ext building 'sphinxbase._sphinxbase' extension swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1

ERROR: Failed building wheel for pocketsphinx Running setup.py clean for pocketsphinx Failed to build pocketsphinx Installing collected packages: pocketsphinx, SpeechRecognition, Pillow, pytesseract, opencv-contrib-python Running setup.py install for pocketsphinx ... error ERROR: Command errored out with exit status 1: command: /home/USER/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/mpathu/USER/.tmp/pip-install-9wprn2yf/pocketsphinx/setup.py'"'"'; file='"'"'/mnt/mpathu/USER/.tmp/pip-install-9wprn2yf/pocketsphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /mnt/mpathu/USER/.tmp/pip-record-1ps_b0c2/install-record.txt --single-version-externally-managed --compile --install-headers /home/USER/include/site/python3.6/pocketsphinx cwd: /mnt/mpathu/USER/.tmp/pip-install-9wprn2yf/pocketsphinx/ Complete output (7 lines): running install running build_ext building 'sphinxbase._sphinxbase' extension swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1

ERROR: Command errored out with exit status 1: /home/USER/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/mpathu/USER/.tmp/pip-install-9wprn2yf/pocketsphinx/setup.py'"'"'; file='"'"'/mnt/mpathu/USER/.tmp/pip-install-9wprn2yf/pocketsphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /mnt/mpathu/USER/.tmp/pip-record-1ps_b0c2/install-record.txt --single-version-externally-managed --compile --install-headers /home/USER/include/site/python3.6/pocketsphinx Check the logs for full command output.

Cookie-Monster-Coder commented 4 years ago

I think I got it to work by removing

try: import Image except ImportError: from PIL import Image

from the src/bw-plex/bw_plex/credits.py file

I don't know if I broke something else tho

Hellowlol commented 4 years ago

You probably did. Its a reason why i have broken up the package as its can be a pita to install everything on Windows. You need to manually install swig.

Cookie-Monster-Coder commented 4 years ago

I keep getting "We couldn't match the client. Trying a hail marry." and errors out. Search the threads on here and found this and it matches my issue, but on every device and browser.

"Closing this as there is nothing I can do as long as the client isn’t on the same network. (According to pms)"

_Originally posted by @Hellowlol in https://github.com/Hellowlol/bw_plex/issues/103#issuecomment-546707466_

Does skipping only work on local playback? I have both PMS and bw_plex running on a hosting site.

Hellowlol commented 4 years ago

What client have you tested? I have never troed that but it might work if the seek command is sent to the server. Can you provide some logs?

Cookie-Monster-Coder commented 4 years ago

Chrome, Firefox. Used both direct url and indirect both failed to skip. and also Android phone running the Plex app

Logs are from Firefox using the direct server url log.txt

OscarBarrett commented 4 years ago

ModuleNotFoundError: No module named 'Image' can be fixed by installing Pillow using pip.

Hellowlol commented 4 years ago

Try reinstalling bw_plex or use a proper fix for, just commenting out code could have unintended sideeffects.

As for your issue regarding the playback. We try to proxy the seek command to the server, but the server cant find the player to relay the command too. I dont know how to fix this.