question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

First issue:

Running bw_plex check_db just ends up throwing a

2018-06-16 16:57:46,572 :: bw_plex :: DEBUG :: Getting server ENDLESS DREAMS MEDIA
Traceback (most recent call last):
  File "C:\Tools\python3\Scripts\bw_plex-script.py", line 11, in <module>
    load_entry_point('bw-plex==0.0.7', 'console_scripts', 'bw_plex')()
  File "c:\tools\python3\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\tools\python3\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\tools\python3\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\tools\python3\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\tools\python3\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\tools\python3\lib\site-packages\bw_plex\plex.py", line 195, in check_db
    client = choose('Select what client to use', PMS.clients(), 'title')[0]
IndexError: list index out of range

Second Issue:

When running bw_plex watch it never fully seems to process the files or something, it’ll sometimes sit there running these three things

2018-06-16 16:39:43,495 :: bw_plex :: DEBUG :: Calling find_offset_ffmpeg with command ffmpeg -i D:\Media\TV Shows\12 Monkeys\Season 04\12 Monkeys - S04E02 - Ouroboros [1080p AVC - 5.1 E-AC3 Eng - AMZN WEB-DL].mkv -t 600 -vf blackdetect=d=0.5:pix_th=0.1 -af silencedetect=n=-50dB:d=0.3 -f null -
2018-06-16 16:46:51,943 :: bw_plex :: DEBUG :: final_video [['00:00', '00:01', '00:01'], ['00:06', '00:10', '00:04'], ['07:52', '07:56', '00:04']]
2018-06-16 16:46:51,951 :: bw_plex :: DEBUG :: final_audio [['00:00', '00:01', '00:01'], ['00:05', '00:06', '00:00']]
2018-06-16 16:46:51,952 :: bw_plex :: DEBUG :: fin v [[0.0, 1.001, 1.001], [6.048, 10.344, 4.296], [472.097, 476.351, 4.254]]
2018-06-16 16:46:51,954 :: bw_plex :: DEBUG :: fin a [[0.0, 1.44581, 1.44581], [5.61173, 6.15529, 0.543562]]
2018-06-16 16:46:51,960 :: bw_plex :: DEBUG :: Checking if 12.Monkeys.s04e02 has a recap with phrase previously on, last season, last episode using subtitles

for so long that by the time the it’s done running that stuff the theme would have come and gone already… I don’t understand why, as it should of processed the information while I was playing the episode before it but it never did it seems like… Full Log up until I aborted bw_plex to make this report: https://paste.ee/p/JbhWL (by the time it reached 2018-06-16 16:46:51,960 :: bw_plex :: DEBUG :: Checking if 12.Monkeys.s04e02 has a recap with phrase previously on, last season, last episode using subtitle, the theme had already came and gone…)


Third Issue:

bw_plex processdoesn’t seem to do much? I ran it thinking that it would go through and process all my tv shows and download theme files and all that so it maybe doesn’t have to go through and do things like in the second issue, but when I ran it all it did was

2018-06-16 16:58:50,848 :: bw_plex :: DEBUG :: Getting server ENDLESS DREAMS MEDIA
2018-06-16 16:58:50,870 :: bw_plex :: DEBUG :: Getting hashtable
2018-06-16 16:58:53,320 :: bw_plex :: INFO :: Loading existing files in db

and then it stopped…

Doing a bw_plex add_theme_to_hashtable instead seems to throw an error

2018-06-16 17:21:22,885 :: bw_plex :: DEBUG :: Getting server ENDLESS DREAMS MEDIA
Traceback (most recent call last):
  File "C:\Tools\python3\Scripts\bw_plex-script.py", line 11, in <module>
    load_entry_point('bw-plex==0.0.7', 'console_scripts', 'bw_plex')()
  File "c:\tools\python3\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\tools\python3\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\tools\python3\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\tools\python3\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\tools\python3\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\tools\python3\lib\site-packages\bw_plex\plex.py", line 477, in add_theme_to_hashtable
    from bw_plex.audfprint.audfprint import multiproc_add
  File "c:\tools\python3\lib\site-packages\bw_plex\audfprint\audfprint.py", line 21, in <module>
    import audfprint_analyze  # The actual analyzer class/code
ModuleNotFoundError: No module named 'audfprint_analyze'

dunno why it throws the error about ModuleNotFoundError: No module named 'audfprint_analyze' as looking in C:\Tools\python3\Lib\site-packages\bw_plex\audfprint the audfprint_analyze.py script is clearly there…


Also why is there no documentation for anything to do the config file? Some of it is easy to understand, but there are things like mode, theme_source, check_credits_action that I don’t understand, like what are they supposed to do, and are there other things you could change those to or something?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:58 (23 by maintainers)

github_iconTop GitHub Comments

3reactions
JourneyOvercommented, Jun 17, 2018

OMG! I have a breakthrough! I was fiddling with how I called bw_plex and I have finally got it to save to the hashtable! it seems that calling it like bw_plex doesn’t make it save to the hashtable, but if I go cd into where bw_plex downloaded to C:\Users\JourneyOver\src\bw-plex\bw_plex and I call python plex.py instead it saves…

λ python plex.py process -n "12 mo"
2018-06-17 15:47:22,004 :: bw_plex :: DEBUG :: Getting server ENDLESS DREAMS MEDIA

0 12 Monkeys

Select what item to process: 0

2 12.Monkeys.s04e03 45 RPM
1 12.Monkeys.s04e02 Ouroboros
0 12.Monkeys.s04e01 The End

Select episodes: 0
2018-06-17 15:47:24,750 :: bw_plex :: DEBUG :: Getting hashtable
2018-06-17 15:47:25,102 :: bw_plex :: INFO :: Creating new hashtable db
2018-06-17 15:47:25,105 :: bw_plex :: DEBUG :: Saving HashTable
2018-06-17 15:47:52,485 :: bw_plex :: DEBUG :: Downloading theme for 1 shows this might take a while..
2018-06-17 15:47:52,542 :: bw_plex :: DEBUG :: 12 Monkeys has 0 themes
2018-06-17 15:47:52,543 :: bw_plex :: DEBUG :: Searching search_tunes for 12 Monkeys using rk 12438
2018-06-17 15:47:53,460 :: bw_plex :: DEBUG :: http://www.televisiontunes.com/search.php?q=12+Monkeys
2018-06-17 15:48:10,978 :: bw_plex :: DEBUG :: Searching youtube for name 12 Monkeys rk 12438 save_path C:\Users\JourneyOver/.config/bw_plex\themes url None
2018-06-17 15:48:36,145 :: bw_plex :: DEBUG :: Download theme using source http://localhost:32400/library/metadata/12438/theme/1529135338?X-Plex-Token=
2018-06-17 15:48:36,151 :: bw_plex :: DEBUG :: calling ffmpeg with ffmpeg -i http://localhost:32400/library/metadata/12438/theme/1529135338?X-Plex-Token= -ac 1 -ar 11025 -acodec pcm_s16le C:\Users\JOURNE~1\AppData\Local\Temp\offset_sxkvxvzi.wav
2018-06-17 15:48:43,545 :: bw_plex :: DEBUG :: Done converted and moved C:\Users\JourneyOver/.config/bw_plex\themes\12 Monkeys__12438__1529268516.wav to C:\Users\JourneyOver/.config/bw_plex\themes
2018-06-17 15:49:05,647 :: bw_plex :: DEBUG :: Download theme using source C:\Users\JourneyOver/.config/bw_plex\themes\12 Monkeys__12438__1529268490.wav
2018-06-17 15:49:05,652 :: bw_plex :: DEBUG :: calling ffmpeg with ffmpeg -i C:\Users\JourneyOver/.config/bw_plex\themes\12 Monkeys__12438__1529268490.wav -ac 1 -ar 11025 -acodec pcm_s16le C:\Users\JOURNE~1\AppData\Local\Temp\offset_ydfdroor.wav
2018-06-17 15:49:08,133 :: bw_plex :: DEBUG :: Done converted and moved C:\Users\JourneyOver/.config/bw_plex\themes\12 Monkeys__12438__1529268490.wav to C:\Users\JourneyOver/.config/bw_plex\themes
2018-06-17 15:49:19,165 :: bw_plex :: DEBUG :: 12 Monkeys has 2 themes
2018-06-17 15:49:19,167 :: bw_plex :: DEBUG :: Started to process 12.Monkeys.s04e01
2018-06-17 15:49:19,174 :: bw_plex :: DEBUG :: Checking if we can reach 12.Monkeys.s04e01 directly
2018-06-17 15:49:19,176 :: bw_plex :: DEBUG :: Found D:\Media\TV Shows\12 Monkeys\Season 04\12 Monkeys - S04E01 - The End [1080p AVC - 5.1 E-AC3 Eng - AMZN WEB-DL].mkv
2018-06-17 15:49:19,183 :: bw_plex :: DEBUG :: calling ffmpeg with ffmpeg -i D:\Media\TV Shows\12 Monkeys\Season 04\12 Monkeys - S04E01 - The End [1080p AVC - 5.1 E-AC3 Eng - AMZN WEB-DL].mkv -ac 1 -ar 11025 -ss 0 -t 600 -acodec pcm_s16le C:\Users\JOURNE~1\AppData\Local\Temp\offset_x5380c16.wav
2018-06-17 15:49:41,672 :: bw_plex :: DEBUG :: Done converting C:\Users\JOURNE~1\AppData\Local\Temp\offset_x5380c16.wav
Sun Jun 17 15:50:20 2018 Analyzed #1 C:\Users\JOURNE~1\AppData\Local\Temp\offset_x5380c16.wav of 599.934 s to 20566 hashes
2018-06-17 15:50:21,957 :: bw_plex :: DEBUG :: Match 0 rank 0 aligntime -10701 theme song C:\Users\JourneyOver/.config/bw_plex\themes\12 Monkeys__12438__1529268516.wav started at 249.08045351473925 (04:09) in ended at 261.41024943310657 (04:21)
2018-06-17 15:50:21,964 :: bw_plex :: DEBUG :: Match 0 rank 0 aligntime -10703 theme song C:\Users\JourneyOver/.config/bw_plex\themes\12 Monkeys__12438__1529268516.wav started at 250.4736507936508 (04:10) in ended at 260.4350113378685 (04:20)
2018-06-17 15:50:21,966 :: bw_plex :: DEBUG :: Best match was C:\Users\JourneyOver/.config/bw_plex\themes\12 Monkeys__12438__1529268516.wav
2018-06-17 15:50:21,968 :: bw_plex :: DEBUG :: Checking if we can reach 12.Monkeys.s04e01 directly
2018-06-17 15:50:21,969 :: bw_plex :: DEBUG :: Found D:\Media\TV Shows\12 Monkeys\Season 04\12 Monkeys - S04E01 - The End [1080p AVC - 5.1 E-AC3 Eng - AMZN WEB-DL].mkv
2018-06-17 15:50:21,971 :: bw_plex :: DEBUG :: Calling find_offset_ffmpeg with command ffmpeg -i D:\Media\TV Shows\12 Monkeys\Season 04\12 Monkeys - S04E01 - The End [1080p AVC - 5.1 E-AC3 Eng - AMZN WEB-DL].mkv -t 600 -vf blackdetect=d=0.5:pix_th=0.1 -af silencedetect=n=-50dB:d=0.3 -f null -
2018-06-17 15:54:53,531 :: bw_plex :: DEBUG :: final_video [['00:00', '00:01', '00:01'], ['00:47', '00:49', '00:02'], ['01:21', '01:22', '00:01'], ['01:29', '01:30', '00:00'], ['01:30', '01:33', '00:02'], ['01:33', '01:34', '00:00'], ['01:53', '01:56', '00:02'], ['03:18', '03:25', '00:07'], ['04:23', '04:28', '00:05'], ['07:21', '07:21', '00:00'], ['08:01', '08:02', '00:00']]
2018-06-17 15:54:53,537 :: bw_plex :: DEBUG :: final_audio [['00:00', '00:01', '00:01'], ['00:05', '00:06', '00:00'], ['00:49', '00:49', '00:00']]
2018-06-17 15:54:53,539 :: bw_plex :: DEBUG :: fin v [[0.0, 1.001, 1.001], [47.172, 49.675, 2.503], [81.248, 82.541, 1.293], [89.881, 90.549, 0.668], [90.966, 93.468, 2.502], [93.594, 94.344, 0.75], [113.864, 116.116, 2.252], [198.031, 205.038, 7.007], [263.722, 268.977, 5.255], [441.316, 441.858, 0.542], [481.648, 482.399, 0.751]]
2018-06-17 15:54:53,544 :: bw_plex :: DEBUG :: fin a [[0.0, 1.42473, 1.42473], [5.62565, 6.1144, 0.48875], [49.0687, 49.7276, 0.658896]]
2018-06-17 15:54:53,545 :: bw_plex :: DEBUG :: Matching windows are [['00:47', '00:49', '00:02']]
2018-06-17 15:54:53,548 :: bw_plex :: DEBUG :: Checking if 12.Monkeys.s04e01 has a recap with phrase previously on, last season, last episode using subtitles
2018-06-17 15:54:54,788 :: bw_plex :: DEBUG :: Downloading subtitle from PMS
2018-06-17 15:55:00,433 :: bw_plex :: DEBUG :: Found previously on  in audio
2018-06-17 15:55:00,459 :: bw_plex :: DEBUG :: Added 12.Monkeys.s04e01 to media.db
2018-06-17 15:55:00,517 :: bw_plex :: DEBUG :: Saving HashTable

So pretty much calling bw_plex instead of python plex.py is broken.

0reactions
JourneyOvercommented, Jun 22, 2018

That’s fine ^^ not a problem at all, if I run into any new problems or think of anything new will let ya know 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Couple Things with Shawn and Andrew on Apple Podcasts
Former Olympic Gymnast Shawn Johnson and NFL player Andrew East sit down to share their most vulnerable sides and open up like they...
Read more >
Couple Things Podcast | Couple Things
Couple Things Podcast with Shawn Johnson & Andrew East.
Read more >
Couples Bucket List: 100+ Fun Activities & Things to Do
The ultimate couples bucket list is full of fun activities, romantic date ideas and unique things to do in your relationship.
Read more >
480 Best Couple Things ideas | relationship goals, cute ...
Mar 7, 2020 - Explore Kage 312's board "Couple Things" on Pinterest. See more ideas about relationship goals, cute relationships, couple goals.
Read more >
Couple Things Podcast (@couplethingspod) • Instagram ...
35.3k Followers, 190 Following, 144 Posts - See Instagram photos and videos from Couple Things Podcast (@couplethingspod)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found