bw_plex: Stuck on "Downloading subtitle from PMS"

Hey! I am somehow still getting stuck when it’s trying to download subtitle from PMS.

image

I have been trying to understand more about how this thing works lately, and I got everything else to work fine, with the token and url in the config file and etc. Would like to finally get this part to work now, if possible.

I did pip install -r requirements.txt and it looked like it was downloading a lot of stuff, but I guess something must still be missing since it’s stuck on this part.

If I run pip list, this is what I currently have installed. I tried some random stuff like pip install srt and such, but I have no idea how to locate the required one. Or maybe the issue lies somewhere else? Just did a full reinstall with the [all] option and removed everything from my .config/bw_plex folder before trying this.

List output: expand
  • asn1crypto (0.24.0)
  • audioread (2.1.5)
  • backports.functools-lru-cache (1.5)
  • beautifulsoup4 (4.6.0)
  • bw-plex (0.0.8.dev10+g1362255, /home/stigus/Documents/plexShowSkip/bw_plex)
  • certifi (2018.4.16)
  • chardet (3.0.4)
  • click (6.7)
  • configobj (5.0.6)
  • cryptography (2.1.4)
  • cycler (0.10.0)
  • decorator (4.3.0)
  • docopt (0.6.2)
  • download (0.3.3)
  • dtrx (7.1)
  • enum34 (1.1.6)
  • et-xmlfile (1.0.1)
  • f.lux-indicator-applet (1.1.11-pre)
  • funcsigs (1.0.2)
  • html5lib (1.0.1)
  • idna (2.6)
  • ipaddress (1.0.17)
  • jdcal (1.4)
  • joblib (0.11)
  • keyring (10.6.0)
  • keyrings.alt (3.0)
  • kiwisolver (1.0.1)
  • librosa (0.6.1)
  • llvmlite (0.23.0)
  • matplotlib (2.2.2)
  • numba (0.38.0)
  • numpy (1.14.3)
  • odfpy (1.3.6)
  • opencv-contrib-python (3.4.1.15)
  • openpyxl (2.5.3)
  • pexpect (4.2.1)
  • Pillow (5.1.0)
  • pip (9.0.1)
  • PlexAPI (3.0.6)
  • pocketsphinx (0.1.3)
  • profilehooks (1.10.0)
  • psutil (5.4.5)
  • pycairo (1.16.2)
  • pycrypto (2.6.1)
  • pygobject (3.26.1)
  • pyparsing (2.2.0)
  • pytesseract (0.2.0)
  • python-dateutil (2.7.3)
  • pytz (2018.4)
  • pyudev (0.21.0)
  • pyxdg (0.25)
  • PyYAML (3.12)
  • requests (2.18.4)
  • resampy (0.2.0)
  • scikit-learn (0.19.1)
  • scipy (1.1.0)
  • SecretStorage (2.3.1)
  • setuptools (39.2.0)
  • singledispatch (3.4.0.3)
  • six (1.11.0)
  • SpeechRecognition (3.8.1)
  • SQLAlchemy (1.2.8)
  • srt (1.6.0)
  • subprocess32 (3.5.1)
  • tablib (0.12.1)
  • tqdm (4.23.4)
  • unicodecsv (0.14.1)
  • urllib3 (1.22)
  • webencodings (0.5.1)
  • websocket-client (0.48.0)
  • wheel (0.30.0)
  • wsaccel (0.6.2)
  • xlrd (1.1.0)
  • xlwt (1.3.0)
  • youtube-dl (2018.5.26)

I don’t really know where to troubleshoot anymore, as everything else seems to work just fine.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (12 by maintainers)

Most upvoted comments

It’s coming along nicely, will contribute a bit. Yeah, I noticed some of the other commands had the same error 😃

Closing this as your issue seemed to be solved. If you have any suggestions/improvements feel free to chip in. 😃

Yeah, works correctly now, used jump in theme interval and then started to process a new episode when that was done 👌 Process command instead of watch also worked perfect 😃

Its “fixed” in the lastest commit. You will need to delete the db before you start the program. Also can you enable check_credits

also can you change your config ini so you values are the same as this?:

[tv]
check_credits = True
check_credits_action = stop
check_credits_start_next_ep = True
check_credits_sec = 120
check_for_theme_sec = 600
check_intro_ffmpeg_sec = 600

[movie]
check_credits = True
check_credits_action = stop
check_credits_sec = 600
check_intro_ffmpeg_sec = 600

That way you can test more features 😃

Thanks its a bug in my sql. Im not that familiar with that. Thanks for the report.

Awesome, thanks a bunch!

Crap. My bad. Ill fix that.

I got an error that “sr is not defined” when i tried to manually process a show, seems like it’s at the same time the issues arise when i use “watch”.

Select episodes: 0
2018-05-29 18:54:50,030 :: bw_plex :: DEBUG :: Getting hashtable
2018-05-29 18:54:50,062 :: bw_plex :: INFO :: Loading existing files in db
2018-05-29 18:54:51,579 :: bw_plex :: DEBUG :: Downloading theme for 1 shows this might take a while..
2018-05-29 18:54:51,594 :: bw_plex :: DEBUG :: Archer (2009) has 0 themes
2018-05-29 18:54:51,594 :: bw_plex :: DEBUG :: Searching search_tunes for Archer (2009) using rk 5875
2018-05-29 18:54:52,710 :: bw_plex :: DEBUG :: http://www.televisiontunes.com/search.php?q=Archer+%282009%29
2018-05-29 18:54:52,963 :: bw_plex :: DEBUG :: Searching youtube for name Archer (2009) rk 5875 save_path /home/stigus/.config/bw_plex/themes url None 
2018-05-29 18:54:56,632 :: bw_plex :: DEBUG :: Download theme using source http://192.168.1.235:32400/library/metadata/5875/theme/1527130301?X-Plex-Token=gPdtZhgWXRSy6XHcPFp1
2018-05-29 18:54:56,633 :: bw_plex :: DEBUG :: calling ffmpeg with ffmpeg -i http://192.168.1.235:32400/library/metadata/5875/theme/1527130301?X-Plex-Token=gPdtZhgWXRSy6XHcPFp1 -ac 1 -ar 11025 -acodec pcm_s16le /tmp/offset_4ELgL3.wav
2018-05-29 18:54:56,761 :: bw_plex :: DEBUG :: Done converted and moved /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav to /home/stigus/.config/bw_plex/themes
2018-05-29 18:54:57,745 :: bw_plex :: DEBUG :: Download theme using source /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612892.wav
2018-05-29 18:54:57,745 :: bw_plex :: DEBUG :: calling ffmpeg with ffmpeg -i /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612892.wav -ac 1 -ar 11025 -acodec pcm_s16le /tmp/offset_UemHu7.wav
2018-05-29 18:54:57,941 :: bw_plex :: DEBUG :: Done converted and moved /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612892.wav to /home/stigus/.config/bw_plex/themes
2018-05-29 18:55:00,020 :: bw_plex :: DEBUG :: Archer (2009) has 2 themes
2018-05-29 18:55:00,020 :: bw_plex :: DEBUG :: Started to process Archer.(2009).s00e04
2018-05-29 18:55:00,021 :: bw_plex :: DEBUG :: Checking if we can reach Archer.(2009).s00e04 directly
2018-05-29 18:55:00,046 :: bw_plex :: DEBUG :: Found /mnt/E/Serier/Archer.S01-S08.480p.WEB.DL.nSD.x264-NhaNc3/Archer/Archer (2009) S00E04 Heart of Archness__ Part I.m4v
2018-05-29 18:55:00,047 :: bw_plex :: DEBUG :: calling ffmpeg with ffmpeg -i /mnt/E/Serier/Archer.S01-S08.480p.WEB.DL.nSD.x264-NhaNc3/Archer/Archer (2009) S00E04 Heart of Archness__ Part I.m4v -ac 1 -ar 11025 -ss 0 -t 600 -acodec pcm_s16le /tmp/offset_3ImhG7.wav
2018-05-29 18:55:02,297 :: bw_plex :: DEBUG :: Done converting /tmp/offset_3ImhG7.wav
Tue May 29 18:55:06 2018 Analyzed #1 /tmp/offset_3ImhG7.wav of 599.307 s to 50127 hashes
2018-05-29 18:55:07,221 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -8023 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 187.17605442176873 (03:07) in ended at 212.04462585034014 (03:32)
2018-05-29 18:55:07,221 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -8161 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 203.89442176870747 (03:23) in ended at 217.6174149659864 (03:37)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -8708 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 206.47183673469388 (03:26) in ended at 215.13287981859412 (03:35)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -7476 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 190.0088888888889 (03:10) in ended at 199.2968707482993 (03:19)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -8433 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 198.53061224489795 (03:18) in ended at 213.01986394557824 (03:33)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -8569 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 203.24426303854875 (03:23) in ended at 210.62820861678006 (03:30)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -8295 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 195.74421768707484 (03:15) in ended at 203.4532426303855 (03:23)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -7066 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 171.5722448979592 (02:51) in ended at 190.17142857142858 (03:10)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -8127 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 190.77514739229025 (03:10) in ended at 215.41151927437642 (03:35)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -7613 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 189.01043083900228 (03:09) in ended at 202.68698412698413 (03:22)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -9118 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 214.43628117913832 (03:34) in ended at 215.20253968253968 (03:35)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -7751 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 189.98566893424038 (03:09) in ended at 221.75056689342404 (03:41)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -7338 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 195.11727891156463 (03:15) in ended at 197.09097505668936 (03:17)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -7990 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 189.01043083900228 (03:09) in ended at 212.0214058956916 (03:32)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -7082 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 189.40517006802722 (03:09) in ended at 190.58938775510205 (03:10)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 4 rank 0 aligntime -7032 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav started at 189.01043083900228 (03:09) in ended at 189.40517006802722 (03:09)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Match 5 rank 1 aligntime 603 theme song /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612892.wav started at 38.89342403628118 (00:38) in ended at 125.82893424036281 (02:05)
2018-05-29 18:55:07,222 :: bw_plex :: DEBUG :: Best match was /home/stigus/.config/bw_plex/themes/Archer (2009)__5875__1527612896.wav
2018-05-29 18:55:07,223 :: bw_plex :: DEBUG :: Checking if we can reach Archer.(2009).s00e04 directly
2018-05-29 18:55:07,223 :: bw_plex :: DEBUG :: Found /mnt/E/Serier/Archer.S01-S08.480p.WEB.DL.nSD.x264-NhaNc3/Archer/Archer (2009) S00E04 Heart of Archness__ Part I.m4v
2018-05-29 18:55:07,223 :: bw_plex :: DEBUG :: Calling find_offset_ffmpeg with command ffmpeg -i /mnt/E/Serier/Archer.S01-S08.480p.WEB.DL.nSD.x264-NhaNc3/Archer/Archer (2009) S00E04 Heart of Archness__ Part I.m4v -t 600 -vf blackdetect=d=0.5:pix_th=0.1 -af silencedetect=n=-50dB:d=0.3 -f null -
2018-05-29 18:55:39,149 :: bw_plex :: DEBUG :: final_video [['00:00', '00:02', '00:02'], ['03:06', '03:06', '00:00'], ['03:38', '03:40', '00:02'], ['08:18', '08:20', '00:02']]
2018-05-29 18:55:39,150 :: bw_plex :: DEBUG :: final_audio [['-1:59', '00:02', '00:02'], ['03:38', '03:41', '00:02'], ['04:24', '04:24', '00:00'], ['04:25', '04:25', '00:00'], ['05:14', '05:14', '00:00'], ['05:14', '05:15', '00:00'], ['05:15', '05:16', '00:00'], ['05:17', '05:17', '00:00'], ['07:25', '07:26', '00:00'], ['07:28', '07:28', '00:00'], ['08:18', '08:20', '00:02']]
2018-05-29 18:55:39,150 :: bw_plex :: DEBUG :: fin v [[0.0, 2.04371, 2.04371], [186.269, 186.77, 0.5005], [218.343, 220.887, 2.54421], [498.289, 500.375, 2.08542]]
2018-05-29 18:55:39,150 :: bw_plex :: DEBUG :: fin a [[-0.0173333, 2.04267, 2.06], [218.767, 221.147, 2.38], [264.239, 264.571, 0.332], [265.423, 265.883, 0.46], [314.063, 314.491, 0.428], [314.511, 315.163, 0.652], [315.919, 316.379, 0.46], [317.455, 317.787, 0.332], [445.935, 446.331, 0.396], [448.111, 448.763, 0.652], [498.255, 500.347, 2.092]]
2018-05-29 18:55:39,150 :: bw_plex :: DEBUG :: Matching windows are [['03:38', '03:40', '00:02'], ['08:18', '08:20', '00:02']]
2018-05-29 18:55:39,150 :: bw_plex :: DEBUG :: There are no phrase, add a phrase in your config to check for recaps.
ERROR:root:global name 'sr' is not defined
Traceback (most recent call last):
  File "plex.py", line 384, in prot
    process_to_db(item)
  File "plex.py", line 120, in process_to_db
    recap = has_recap(media, CONFIG['tv'].get('words', []), audio=vid)
  File "/home/stigus/Documents/plexShowSkip/bw_plex/bw_plex/misc.py", line 756, in has_recap
    audio_recap = has_recap_audio(audio)
  File "/home/stigus/Documents/plexShowSkip/bw_plex/bw_plex/misc.py", line 723, in has_recap_audio
    except sr.UnknownValueError:
NameError: global name 'sr' is not defined
2018-05-29 18:55:40,196 :: bw_plex :: DEBUG :: Saving HashTable
DEBUG:bw_plex:Saving HashTable