Giter Club home page Giter Club logo

bw_plex's Introduction

bw_plex

Codacy Badge Travis Status Cov GitHub Releases PyPI version GitHub last commit docker build

A tool for skipping intro and outro for plex.

Features

  • identify outro start and end scanning the video for credits text.
  • identify intro start and end using themes song or blackframes and audio silence.
  • identify if the video has a recap using subtitles and audio.
  • download theme songs.
  • process on playback start.
  • process on recently added.
  • control the client to skip intro/outro.
  • start next episode when the credits start.
  • create chapter for intro and outro

Install

You should install this from github as this project isnt stable. pip install -e git+https://github.com/Hellowlol/bw_plex.git#egg=bw_plex or using a docker docker pull hellowlol/bw_plex. You may also need to pip install Pillow.

Usage

Note: This tool only works on your local network and use a 64 bit python install.

Usage: bw_plex

[OPTIONS] COMMAND [ARGS]...

  CLI tool that monitors pms and jumps the client to after the theme.

Options:
  -d, --debug             Add debug logging.
  -u, --username TEXT     Your plex username
  -p, --password TEXT     Your plex password
  -s, --servername TEXT   The server you want to monitor.
  --url TEXT              url to the server you want to monitor
  -t, --token TEXT        plex-x-token
  -c, --config TEXT       Not in use atm.
  -vs, --verify_ssl TEXT  Enable this to allow insecure connections to PMS
  --help                  Show this message and exit.

Commands:
  add_theme_to_hashtable  Create a hashtable from the themes.
  check_db                Do a manual check of the db.
  create_config           Create a config file.
  export_db               Export the db to some other format.
  ffmpeg_process          Simple manual test for ffmpeg_process with...
  manually_correct_theme  Set the correct fingerprint of the show in...
  match                   Manual match for a file.
  process                 Manual process some/all eps.
  set_manual_theme_time   Set a manual start and end time for a theme.
  watch                   Start watching the server for stuff to do.

You can read the help for the subcommands using --help: bw_plex export_db --help

The most common command is: bw_plex watch --url "http://....." -t "aaabb" you can skip the url and token flags if you edit the config.ini

Resources

The memory usage and especially the CPU can get very high. If you running bw_plex in a docker on a shared server consider adding resource constraints. For simple cpu constraints you can set the niceness with the nice flag bw_plex --nice nicenesslevel command

Configuration File

bw_plex automatically generates a default configuration file located at ~/.config/bw_plex/config.ini. Most of the entries have notes accompanying them explaining what each one does, and what the options are.

How it works:

Bw_plex listens for playing events using websocket. We download the first 10 minutes of that episode and/or the theme music from YouTube/tvtunes/Plex.

We then create a audio print from the theme song that we match against the audio of the 10 minutes of the episode. (There’s a backup method that uses audio silence in combination with black frames too).

We then check if this episode has a recap using subtitles and audio where we look for clues like last season, previously on (add you own words in the config), then we download last part of the episode an and indentify the start and end of the outro.

Depending on your settings we will then allow playback until the theme start or just jump straight to intro end if we also should skip recaps.

Since this is a rather slow process we also start processing the next episode so next time you watch the same show we instantly seek the client to the end of the theme.

bw_plex's People

Contributors

antifuchs avatar cclauss avatar codacy-badger avatar davdroman avatar deepfriedmind avatar dependabot-preview[bot] avatar hellowlol avatar jpartain89 avatar nick-traeger avatar purplemyst avatar sammcj avatar stayupthetree avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bw_plex's Issues

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.

@hellowlol a question for you.

Hi, I was unsure of how to contact you with a question since github removed their messenge feature.

I've been considering making a script that removes the green "approved for certain audiences" that appear ahead of trailers. Although I don't know where to start.

Considering that your project has to do with analyzing a fairly repetetive pattern from video file. I was wondering if you know of a way to do this.

I don't need a detailed explanation just a few key components that you know of that I could google and use in my script.

Sorry if this is the wrong place for this question.

Thank you.

Decide if and how to handle Credits

The problem is not detecting it, that code is already written. It's matching is rather CPU intensive and it would require much larger download as we would need to download the entire video file instead of just the first 10 minutes.

Should it be a config option or something? Skip the entire thing.

Stuck on subtitle keyword search

Hey, thanks for the work you have put into this, I really like the idea behind this project, and it seems like a really smart way to handle it. Unfortunately I am unable to make it work properly. I get as far as the line where it's trying to look trough a subtitle file, but at that moment it is stuck until I try to play another episode. It does find the right time in the previous line;
"bw_plex :: DEBUG :: Matching windows are [['03:15', '03:18', '00:02'], ['03:15', '03:18', '00:02'], ['03:15', '03:18', '00:02']]"
where 3:15 or 3:18 would be the perfect time to skip toward, if that is how it would work.

The debug message I get when stuck is:
"bw_plex :: DEBUG :: Checking if .. has a recap with phrase previously on, last season, last episode using subtitles"

Using Ubuntu as a plex server, but if there is no solution for ubuntu, can I disable the subtitle iteration, and only skip trough the theme somehow? It has the length of the theme right I think, and seems to know exactly when to skip to, so I feel like I am close to getting it working.

Test long running

PMS might time out because of keep alive connections (for http requests.)

Not jumping while using watch.

Jumping to the correct place can be skipped if the theme is very short <10 sec as the "websocket tick" normally happens every 7-10 sec. Should we just skip ever short themes or calculate the tick then jump?

bug for plex web

Sometimes pms.clients() uses a loop back address. Just grab the address from sessions client instead.

Detect motion during credits

Let’s see if we can detect motion while credits are rolling.

The idea is is to check if we have bounding boxes, combine that that to one. Use that to exclude this area from motion and check for motion in the rest of the image.

Remote Server/Compatible clients?

I have a remote Plex server and am running bw_plex on a (Windows 10) computer on my local network.

It's saying it is calling the jump but nothing is happening

2018-06-18 15:09:19,005 :: bw_plex :: DEBUG :: Called jump with <bw_plex.db.Processed object at 0x000000001FE23668> 632 28.4212244898 None
2018-06-18 15:09:19,005 :: bw_plex :: DEBUG :: Called client_action with 28.4212244898 00:28 632 None
2018-06-18 15:09:19,066 :: bw_plex :: DEBUG :: client Bedroom 9

Apple TV is my primary client but I figured maybe it didn't work so I tried some others
PMP on macOS and Windows (the machine running bw_plex), Plex/Web via Safari and Chrome, Plex on iOS, Plex for Kodi.

Are any of these clients supported or am I doing something wrong? I know having remote clients doesn't work but does a remote server not work either?

No connection adapters

Ok - so i ditched running this on windows for the moment :P got it on ubuntu at the moment but getting this error

requests.exceptions.InvalidSchema: No connection adapters were found for '192.168.1.220:32400/?X-Plex-Token=

Third method to find intros

Phash every frame, of a video or intro. Use most common to identify the intro (spanning several episodes) this could also be used for detecting recaps as we can check if this was a part of the previous episode.

TODO

  • get better themes.
  • Make it easy to replace a bad theme
  • Analyze for previously on showname to detect recap.
  • credits
  • logging
  • error handling.
  • package.

Possible

  • db export
  • webserver api,, this should require a hashing metod. thus need to dl the entire file..

wavfile2peaks: Error reading file skipping ... python stuck indefinitely

Posted this on reddit, but just thought I'd post here as well..

running plex_jump.py create_hash_table_from_themes I end up seeming to throw an error and then python just hangs indefinitely..

2018-01-02 12:33:54,628 :: F:\Misc\bw_plex\plex_jump.py :: INFO :: Loading existing files in db
Read fprints for 0 files ( 0 hashes) from F:\Misc\bw_plex\hashes.pklz (0.00% dropped)
Error reading header info from F:\Misc\bw_plex\themes\Channel Zero__5826.mp3
wavfile2peaks: Error reading F:\Misc\bw_plex\themes\Channel Zero__5826.mp3 skipping
Process Process-1:
Traceback (most recent call last):
  File "C:\Tools\python2\lib\multiprocessing\process.py", line 267, in _bootstrap
    self.run()
  File "C:\Tools\python2\lib\multiprocessing\process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "F:\Misc\bw_plex\audfprint\audfprint.py", line 128, in make_ht_from_list
    hashes = analyzer.wavfile2hashes(filename)
  File "F:\Misc\bw_plex\audfprint\audfprint_analyze.py", line 408, in wavfile2hashes
    self.peaks2landmarks(peaklist)))
  File "F:\Misc\bw_plex\audfprint\audfprint_analyze.py", line 88, in landmarks2hashes
    hashes[:, 0] = landmarks[:, 0]
IndexError: too many indices for array

bw_plex watch errors

Hi, I've installed everything that was required and I've setup the config file to what I believe is correct.
So I've tried running bw_plex watch but I'm getting these errors.

I'm on Windows 7.

File "c:\Python27\Scripts\bw_plex-script.py", line 11, in <module> load_entry_point('bw-plex', 'console_scripts', 'bw_plex')() File "c:\python27\lib\site-packages\click\core.py", line 722, in __call__ return self.main(*args, **kwargs) File "c:\python27\lib\site-packages\click\core.py", line 697, in main rv = self.invoke(ctx) File "c:\python27\lib\site-packages\click\core.py", line 1063, in invoke Command.invoke(self, ctx) File "c:\python27\lib\site-packages\click\core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\python27\lib\site-packages\click\core.py", line 535, in invoke return callback(*args, **kwargs) File "c:\users\patrick\src\bw-plex\bw_plex\plex.py", line 176, in cli verify_ssl=verify_ssl) File "c:\users\patrick\src\bw-plex\bw_plex\misc.py", line 44, in get_pms PMS = PlexServer(url, token, sess) File "c:\python27\lib\site-packages\plexapi\server.py", line 102, in __init_ data = self.query(self.key, timeout=timeout) File "c:\python27\lib\site-packages\plexapi\server.py", line 348, in query return ElementTree.fromstring(data) if data.strip() else None File "<string>", line 124, in XML lementTree.ParseError: not well-formed (invalid token): line 20, column 56

Then I tried installing pip again incase something was missing and I got these errors.

File "c:\Python27\Scripts\bw_plex-script.py", line 11, in <module> load_entry_point('bw-plex', 'console_scripts', 'bw_plex')() File "c:\python27\lib\site-packages\click\core.py", line 722, in __call__ return self.main(*args, **kwargs) File "c:\python27\lib\site-packages\click\core.py", line 697, in main rv = self.invoke(ctx) File "c:\python27\lib\site-packages\click\core.py", line 1063, in invoke Command.invoke(self, ctx) File "c:\python27\lib\site-packages\click\core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\python27\lib\site-packages\click\core.py", line 535, in invoke return callback(*args, **kwargs) File "c:\users\patrick\src\bw-plex\bw_plex\plex.py", line 176, in cli verify_ssl=verify_ssl) File "c:\users\patrick\src\bw-plex\bw_plex\misc.py", line 44, in get_pms PMS = PlexServer(url, token, sess) File "c:\python27\lib\site-packages\plexapi\server.py", line 102, in __init_ data = self.query(self.key, timeout=timeout) File "c:\python27\lib\site-packages\plexapi\server.py", line 348, in query return ElementTree.fromstring(data) if data.strip() else None File "<string>", line 124, in XML lementTree.ParseError: not well-formed (invalid token): line 20, column 56

Add modes

Like

  • skip theme (just theme music)
    This should be the default action as its the most safe option.
  • skip intro check for recap
    • use pocketsphinx, make a transcript and look for word like. last season, last season, previously on .. This should be a config option.
    • using subtitle.

AttributeError: 'NoneType' object has no attribute 'friendlyName'

Hi there,

When running bw_plex I get the following error: AttributeError: 'NoneType' object has no attribute 'friendlyName'

console:
chravtacque@DESKTOP-IRNQD9C:~/.local/bin$ /home/chravtacque/.local/bin/bw_plex watch
2018-06-03 06:53:47,465 :: bw_plex :: DEBUG :: Getting hashtable
2018-06-03 06:53:47,673 :: bw_plex :: INFO :: Creating new hashtable db
2018-06-03 06:53:47,674 :: bw_plex :: DEBUG :: Saving HashTable
Traceback (most recent call last):
File "/home/chravtacque/.local/bin/bw_plex", line 11, in <module>
sys.exit(cli())
File "/home/chravtacque/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/chravtacque/.local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/chravtacque/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/chravtacque/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/chravtacque/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/chravtacque/.local/lib/python2.7/site-packages/bw_plex/plex.py", line 859, in watch
click.echo('Watching for media on %s' % PMS.friendlyName)
AttributeError: 'NoneType' object has no attribute 'friendlyName'

Any ideas on how to fix this?

Jumping but nothing happens.

https://i.imgur.com/Iix09xw.png

2018-02-07 23:26:19,922 :: bw_plex :: DEBUG :: Should have called jump
2018-02-07 23:26:19,922 :: bw_plex :: DEBUG :: Called jump with 95.7126530612 86
2018-02-07 23:26:19,965 :: bw_plex :: DEBUG :: client xx 31

Tried different players but nothing happens.

Download theme from plex

Is it an option to get the theme from http://tvthemes.plexapp.com/<tvdb-id>.mp3 instead of youtube? Maybe i can try to implement this.

Skip not sending correctly in Firefox client

Server Environment:
Windows 10 Pro 1709 16299.492
Plex Media Server 1.13.5.5291

Client Environment:
Windows 10 Pro 1709 16299.492
Firefox 61.0.1 (64-bit)

bw_plex Environment:
Windows 10 Pro 1709 16299.492
bw_plex 0.0.9.dev2+g35b90c3

General Environment Details:
PMS Server, Client and bw_plex are running from the same machine.

Problem:
After starting bw_plex, then starting a show, it properly finds and updates the client info in the log, then attempts to send the skip command. However the skip doesn't happen.

Log during skip event:

2018-08-03 23:35:15,461 :: bw_plex :: DEBUG :: plex.py:846 :: Called jump with The.Office.(US).s01e02 5 27.376326530612246 None
2018-08-03 23:35:15,463 :: bw_plex :: DEBUG :: plex.py:654 :: Called client_action with 27.376326530612246 00:27 5 None
2018-08-03 23:35:15,993 :: bw_plex :: DEBUG :: plex.py:687 :: client Firefox 9.0

Crashing when trying to find recap

I've tried this on a few different files, and all are throwing this error... Is there something I'm missing with the setup?

2018-03-29 17:10:57,104 :: bw_plex :: DEBUG :: Checking if ##REDACTED## has a recap with phrase previously on, last season, last episode using subtitles
ERROR:root:
Traceback (most recent call last):
File "/root/src/bw-plex/bw_plex/plex.py", line 345, in prot
process_to_db(item)
File "/root/src/bw-plex/bw_plex/plex.py", line 136, in process_to_db
recap = has_recap(media, CONFIG.get('words'), audio=vid)
File "/root/src/bw-plex/bw_plex/misc.py", line 612, in has_recap
audio_recap = has_recap_audio(audio)
File "/root/src/bw-plex/bw_plex/misc.py", line 578, in has_recap_audio
result = r.recognize_sphinx(audio, keyword_entries=[(i, thresh) for i in phrase])
File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", line 806, in recognize_sphinx
raise UnknownValueError() # no transcriptions available
UnknownValueError

Unable to authorize

./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>

exception in process_to_db

Let me preface this by that it's most probably a configuration issue. I'm a programmer, but not a python programmer so there's a very decent chance that I have some sort of missing file/path variable/link/etc that's causing the problem.

I haven't been able to run "bw_plex.py watch" or "plex.py process" without poblems. "Watch" starts working until I play a file.

I was reading through the open issues and this one: #34 had a suggestion to checkout a different branch (ffs branch) with some additional logging so I did that and ran this command:

plex.py test_show cheers -s 3 -e 12

Attached is the log file that shows the error.
log.txt

I'm apparently missing some module/file/script but I cannot figure out which one it is or where it should go! Any help would be greatly appreciated and sorry if it's something really dumb that I did.

Installation

Hey guys sorry for the noob question, but how should i install and use this? i've installed it through pip but not quite sure what to do next.
Also, is it possible for it to in any way 'hurt' my server?

Handle timeline event

Should watch command also handle timeline event so as soon as something is added to plex we start processing to db?

ascii issue

i have some episodes in Czech language so there is diacritic

PS C:\Users\Halali> bw_plex find_theme
2018-04-21 10:39:47,450 :: bw_plex :: DEBUG :: Getting server Server
2018-04-21 10:39:47,716 :: bw_plex :: DEBUG :: Downloading all themes from youtube. This might take a while..
2018-04-21 10:39:49,211 :: bw_plex :: DEBUG :: Searching youtube for name The 100 rk 243380 save_path C:\Users\Halali/.config/bw_plex\temp_themes url None
2018-04-21 10:40:54,953 :: bw_plex :: DEBUG :: Searching youtube for name 12 Monkeys rk 316883 save_path C:\Users\Halali/.config/bw_plex\temp_themes url None
2018-04-21 10:40:58,450 :: bw_plex :: DEBUG :: Searching youtube for name 13 Reasons Why rk 706334 save_path C:\Users\Halali/.config/bw_plex\temp_themes url None
2018-04-21 10:41:02,282 :: bw_plex :: DEBUG :: Searching youtube for name 13.okrsek rk 755649 save_path C:\Users\Halali/.config/bw_plex\temp_themes url None
2018-04-21 10:41:05,835 :: bw_plex :: DEBUG :: Searching youtube for name 24 Hodin: Nezastavitelný rk 729628 save_path C:\Users\Halali/.config/bw_plex\temp_themes url None
Traceback (most recent call last):
  File "C:\Python27\Scripts\bw_plex-script.py", line 11, in <module>
    load_entry_point('bw-plex', 'console_scripts', 'bw_plex')()
  File "c:\python27\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\python27\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\python27\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\python27\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\python27\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "d:\apps\src\bw-plex\bw_plex\plex.py", line 453, in find_theme
    save_path=TEMP_THEMES)
  File "d:\apps\src\bw-plex\bw_plex\misc.py", line 432, in search_for_theme_youtube
    fp = get_valid_filename(fp)
  File "d:\apps\src\bw-plex\bw_plex\misc.py", line 291, in get_valid_filename
    clean_tail = str(tail).strip()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfd' in position 23: ordinal not in range(128)

Couple Things

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?

Py 3

Audfprint now supports py3.

Running pip install bw_plex[all] on Windows 10 PC results in error

Command "c:\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\matth\AppData\Local\Temp\pip-install-1vsns3d6\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 C:\Users\matth\AppData\Local\Temp\pip-record-es4b5b68\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\matth\AppData\Local\Temp\pip-install-1vsns3d6\pocketsphinx\

Running pip install bw_plex works, however, but it talks about not having speech recognition and it wants me to run the [audio] or [all] versions of the command, both resulting in the error above.

Error when installing

I tried installing this script but ran into an issue, not sure what to do.
I am running on a non-root user with no sudo access.

user@server ~ $ pip3 --version
pip 10.0.0 from /home/user/.local/lib64/python3.4/site-packages/pip (python 3.4)

user@server ~ $ python3 --version
Python 3.6.5

user@server ~ $ pip3 install --user wsaccel
Collecting wsaccel
  Downloading https://files.pythonhosted.org/packages/52/46/9ef0744b434ac723ae3aeddcb92ab29af14f8912f53f47590b5a0db0b9d6/wsaccel-0.6.2.tar.gz
Building wheels for collected packages: wsaccel
  Running setup.py bdist_wheel for wsaccel ... done
  Stored in directory: /home/user/.cache/pip/wheels/6c/30/e8/1ea54bc1e5bcf3ec2c5c91d393b02d2fb89121544e46645209
Successfully built wsaccel
Installing collected packages: wsaccel
Successfully installed wsaccel-0.6.2

user@server ~ $ rm -r src/
rm: remove write-protected regular file 'src/bw-plex/.git/objects/pack/pack-1812660c18bf9c4d17849b8ba7fb56365616b62e.pack'? y
rm: remove write-protected regular file 'src/bw-plex/.git/objects/pack/pack-1812660c18bf9c4d17849b8ba7fb56365616b62e.idx'? y

user@server ~ $ pip3 install -e git+https://github.com/Hellowlol/bw_plex.git#egg=bw_plex
Obtaining bw_plex from git+https://github.com/Hellowlol/bw_plex.git#egg=bw_plex
  Updating ./src/bw-plex clone
Collecting librosa (from bw_plex)
Collecting plexapi>=3.0.6 (from bw_plex)
Requirement already satisfied: joblib in ./.local/lib64/python3.4/site-packages (from bw_plex) (0.11)
Requirement already satisfied: numpy in ./.local/lib64/python3.4/site-packages (from bw_plex) (1.14.2)
Collecting docopt (from bw_plex)
Collecting click (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Requirement already satisfied: scipy in ./.local/lib64/python3.4/site-packages (from bw_plex) (1.0.1)
Collecting matplotlib (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/c0/a1/fc0ab025db6c6189b377da66cb0fc281c6ad68021820ef7663d85e177b8d/matplotlib-2.2.2-cp34-cp34m-manylinux1_x86_64.whl
Collecting psutil (from bw_plex)
Collecting profilehooks (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/b6/b2/d2dfe3bab029df73991a3ba244d94c24d4a96e2fa2aabe6bca85fcc67304/profilehooks-1.10.0-py2.py3-none-any.whl
Collecting sqlalchemy (from bw_plex)
Collecting configobj (from bw_plex)
Collecting youtube-dl (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/38/98/759cc271d2cda665671a835689b3fb5c5dcd6a3a3cdaf81164dd270cb263/youtube_dl-2018.4.16-py2.py3-none-any.whl
Collecting beautifulsoup4 (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/9e/d4/10f46e5cfac773e22707237bfcd51bbffeaf0a576b0a847ec7ab15bd7ace/beautifulsoup4-4.6.0-py3-none-any.whl
Collecting html5lib (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/a5/62/bbd2be0e7943ec8504b517e62bab011b4946e1258842bc159e5dfde15b96/html5lib-1.0.1-py2.py3-none-any.whl
Collecting opencv-contrib-python (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/5e/01/d482c01255bd2f742637bc83a93384d17bb595e5065b43e7665414850897/opencv_contrib_python-3.4.0.12-cp34-cp34m-manylinux1_x86_64.whl
Collecting pytesseract (from bw_plex)
Collecting pocketsphinx (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/93/5f/a968e5d53d25e32deb78c3e169fd8612ecf53cc76e32cb40e19be35696af/pocketsphinx-0.1.3.tar.bz2
Collecting SpeechRecognition (from bw_plex)
  Using cached https://files.pythonhosted.org/packages/26/e1/7f5678cd94ec1234269d23756dbdaa4c8cfaed973412f88ae8adf7893a50/SpeechRecognition-3.8.1-py2.py3-none-any.whl
Collecting tablib (from bw_plex)
Requirement already satisfied: decorator>=3.0.0 in ./.local/lib64/python3.4/site-packages (from librosa->bw_plex) (4.3.0)
Collecting resampy>=0.2.0 (from librosa->bw_plex)
Requirement already satisfied: audioread>=2.0.0 in ./.local/lib64/python3.4/site-packages (from librosa->bw_plex) (2.1.5)
Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in ./.local/lib64/python3.4/site-packages (from librosa->bw_plex) (0.19.1)
Requirement already satisfied: six>=1.3 in ./.local/lib64/python3.4/site-packages (from librosa->bw_plex) (1.11.0)
Collecting requests (from plexapi>=3.0.6->bw_plex)
  Using cached https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl
Collecting tqdm (from plexapi>=3.0.6->bw_plex)
  Using cached https://files.pythonhosted.org/packages/78/bc/de067ab2d700b91717dc5459d86a1877e2df31abfb90ab01a5a5a5ce30b4/tqdm-4.23.0-py2.py3-none-any.whl
Collecting websocket-client (from plexapi>=3.0.6->bw_plex)
  Using cached https://files.pythonhosted.org/packages/9d/fb/f51a03e232e00d6c504dfe815aed090c894ba3f8d3f7fd9612f3e227bf24/websocket_client-0.47.0-py2.py3-none-any.whl
Collecting pytz (from matplotlib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/dc/83/15f7833b70d3e067ca91467ca245bae0f6fe56ddc7451aa0dc5606b120f2/pytz-2018.4-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/6a/8a/718fd7d3458f9fab8e67186b00abdd345b639976bc7fb3ae722e1b026a50/pyparsing-2.2.0-py2.py3-none-any.whl
Collecting python-dateutil>=2.1 (from matplotlib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/0c/57/19f3a65bcf6d5be570ee8c35a5398496e10a0ddcbc95393b2d17f86aaaf8/python_dateutil-2.7.2-py2.py3-none-any.whl
Collecting cycler>=0.10 (from matplotlib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/12/51/019f130533d1561c07a5e9877bed100bafca9864a52eaddc0db1d40da0b8/kiwisolver-1.0.1-cp34-cp34m-manylinux1_x86_64.whl
Collecting webencodings (from html5lib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl
Collecting Pillow (from pytesseract->bw_plex)
  Using cached https://files.pythonhosted.org/packages/c6/c1/dfd3b4d0ddd92cf2ef6bb2b0786649b29fb7e1dd560c00f5ac0383aa7023/Pillow-5.1.0-cp34-cp34m-manylinux1_x86_64.whl
Collecting xlwt (from tablib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/44/48/def306413b25c3d01753603b1a222a011b8621aed27cd7f89cbc27e6b0f4/xlwt-1.3.0-py2.py3-none-any.whl
Collecting odfpy (from tablib->bw_plex)
Requirement already satisfied: pyyaml in ./.local/lib64/python3.4/site-packages (from tablib->bw_plex) (3.12)
Collecting unicodecsv (from tablib->bw_plex)
Collecting openpyxl (from tablib->bw_plex)
Collecting xlrd (from tablib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/07/e6/e95c4eec6221bfd8528bcc4ea252a850bffcc4be88ebc367e23a1a84b0bb/xlrd-1.1.0-py2.py3-none-any.whl
Collecting numba>=0.32 (from resampy>=0.2.0->librosa->bw_plex)
Collecting chardet<3.1.0,>=3.0.2 (from requests->plexapi>=3.0.6->bw_plex)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests->plexapi>=3.0.6->bw_plex)
  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests->plexapi>=3.0.6->bw_plex)
  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->plexapi>=3.0.6->bw_plex)
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Requirement already satisfied: setuptools in ./.local/lib64/python3.4/site-packages (from kiwisolver>=1.0.1->matplotlib->bw_plex) (39.0.1)
Collecting et-xmlfile (from openpyxl->tablib->bw_plex)
Collecting jdcal (from openpyxl->tablib->bw_plex)
  Using cached https://files.pythonhosted.org/packages/a0/38/dcf83532480f25284f3ef13f8ed63e03c58a65c9d3ba2a6a894ed9497207/jdcal-1.4-py2.py3-none-any.whl
Collecting llvmlite>=0.22.0.dev0 (from numba>=0.32->resampy>=0.2.0->librosa->bw_plex)
  Using cached https://files.pythonhosted.org/packages/b4/f4/ddc252b83257bbf3922e47c5042a2e28e68bd36146a932adda3010c48377/llvmlite-0.22.0.tar.gz
Building wheels for collected packages: pocketsphinx, llvmlite
  Running setup.py bdist_wheel for pocketsphinx ... error
  Complete output from command /usr/lib/python-exec/python3.4/python3 -u -c "import setuptools, tokenize;__file__='/home/user/tmp/pip-install-oxraeg71/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 /home/user/tmp/pip-wheel-bsi9_3h1 --python-tag cp34:
  running bdist_wheel
  running build_ext
  building 'sphinxbase._ad' extension
  swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
  swig -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
  creating build
  creating build/temp.linux-x86_64-3.4
  creating build/temp.linux-x86_64-3.4/swig
  creating build/temp.linux-x86_64-3.4/swig/sphinxbase
  creating build/temp.linux-x86_64-3.4/deps
  creating build/temp.linux-x86_64-3.4/deps/sphinxbase
  creating build/temp.linux-x86_64-3.4/deps/sphinxbase/src
  creating build/temp.linux-x86_64-3.4/deps/sphinxbase/src/libsphinxad
  x86_64-pc-linux-gnu-gcc -pthread -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python3.4m -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-3.4/swig/sphinxbase/ad_wrap.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
  x86_64-pc-linux-gnu-gcc -pthread -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python3.4m -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-3.4/deps/sphinxbase/src/libsphinxad/ad_pulse.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
  deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:10: fatal error: pulse/pulseaudio.h: No such file or directory
   #include <pulse/pulseaudio.h>
            ^~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for pocketsphinx
  Running setup.py clean for pocketsphinx
  Running setup.py bdist_wheel for llvmlite ... error
  Complete output from command /usr/lib/python-exec/python3.4/python3 -u -c "import setuptools, tokenize;__file__='/home/user/tmp/pip-install-oxraeg71/llvmlite/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 /home/user/tmp/pip-wheel-jwxnwxkd --python-tag cp34:
  running bdist_wheel
  /usr/lib/python-exec/python3.4/python3 /home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py", line 91, in main_posix
      out = subprocess.check_output([llvm_config, '--version'])
    File "/usr/lib64/python3.4/subprocess.py", line 604, in check_output
      with Popen(*popenargs, stdout=PIPE, **kwargs) as process:
    File "/usr/lib64/python3.4/subprocess.py", line 856, in __init__
      restore_signals, start_new_session)
    File "/usr/lib64/python3.4/subprocess.py", line 1464, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py", line 141, in <module>
      main()
    File "/home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py", line 131, in main
      main_posix('linux', '.so')
    File "/home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py", line 94, in main_posix
      "to the path for llvm-config" % (llvm_config,))
  RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
  error: command '/usr/lib/python-exec/python3.4/python3' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build pocketsphinx llvmlite
Installing collected packages: llvmlite, numba, resampy, librosa, chardet, urllib3, idna, certifi, requests, tqdm, websocket-client, plexapi, docopt, click, pytz, pyparsing, python-dateutil, cycler, kiwisolver, matplotlib, psutil, profilehooks, sqlalchemy, configobj, youtube-dl, beautifulsoup4, webencodings, html5lib, opencv-contrib-python, Pillow, pytesseract, pocketsphinx, SpeechRecognition, xlwt, odfpy, unicodecsv, et-xmlfile, jdcal, openpyxl, xlrd, tablib, bw-plex
  Running setup.py install for llvmlite ... error
    Complete output from command /usr/lib/python-exec/python3.4/python3 -u -c "import setuptools, tokenize;__file__='/home/user/tmp/pip-install-oxraeg71/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /home/user/tmp/pip-record-8l2fmyvi/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    got version from file /home/user/tmp/pip-install-oxraeg71/llvmlite/llvmlite/_version.py {'version': '0.22.0', 'full': '46b4b5e288f3a175332ad68d8c3745c63fbb5701'}
    running build_ext
    /usr/lib/python-exec/python3.4/python3 /home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py", line 91, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/usr/lib64/python3.4/subprocess.py", line 604, in check_output
        with Popen(*popenargs, stdout=PIPE, **kwargs) as process:
      File "/usr/lib64/python3.4/subprocess.py", line 856, in __init__
        restore_signals, start_new_session)
      File "/usr/lib64/python3.4/subprocess.py", line 1464, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py", line 141, in <module>
        main()
      File "/home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py", line 131, in main
        main_posix('linux', '.so')
      File "/home/user/tmp/pip-install-oxraeg71/llvmlite/ffi/build.py", line 94, in main_posix
        "to the path for llvm-config" % (llvm_config,))
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/usr/lib/python-exec/python3.4/python3' failed with exit status 1
    
    ----------------------------------------
Command "/usr/lib/python-exec/python3.4/python3 -u -c "import setuptools, tokenize;__file__='/home/user/tmp/pip-install-oxraeg71/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /home/user/tmp/pip-record-8l2fmyvi/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /home/user/tmp/pip-install-oxraeg71/llvmlite

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.