-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistent errors: Windows error (123) and max() arg is empty sequence #29
Comments
Further: The problem seems to be that the try block fails and falls through to the except block. It fails within create_supercut() at the point that moviepy is called:
The call to VideoFileClip() is also what throws the Windows(123) error, so my suspicion now falls on moviepy. |
Can you paste the whole error that occurs when you remove the try block ? |
Hi Zulko, Here is the error message I get when I perform a search that returns fewer than the max clips threshold. This just means that I bypass the create_supercut_in_batches() function and it's try/except block.
I have to call it quits for tonight. Tomorrow I want to follow the process through ffmpeg where I'm beginning to think the problem lies.. Thanks for your interest.
|
Hi Zulko, Here is the error message I get when I perform a search that returns fewer than the max clips threshold. This just means that I bypass the create_supercut_in_batches() function and it's try/except block.
Thanks for your interest. |
It seems like a file name issue... strange. |
Man, that was a mission! I've finally cracked it (chest puffed, superior expression...) at the beginning of videogrep.py, and the appropriate place in conf.py (for moviepy), where you indicate your path to ffmpeg and IMAGEMAGICK_BINARY, place an 'r' immediately before the opening quote. For example, on my (Windows) machine, in conf.py: FFMPEG_BINARY = r'D:\ffmpeg\bin\ffmpeg' ...and in videogrep.py FFMPEG_BINARY = r'D:\ffmpeg\bin\ffmpeg' (note the leading r) This inputs a raw string and stops python from shagging around with double backslashes etc (I think). Maybe the instructions can be amended? |
Yes they will be ! Thanks a bunch ! |
I'm using Win XP, SP3. This old girl runs on hamsters. Still, she can handle most python scripts. Here's what I've done so far: Uninstalled and reinstalled all of the elements needed including Python27. I have uninstalled all other Pythons. I have checked all the environment variables and pointed the scripts to my ffmpg installation. I have gone through the videogrep script and removed all unnecessary white space and standardised the tabs (to tabs, then to spaces). When I run the script it finds the .srt file, then the .mp4 file. In my example search ...
(python -m pdb d:\videogrep-master\videogrep.py --input "E:\Movies\TheMatrix\The_Matrix.mp4" --search "JJ NNS" --search-type pos)
... it finds 24 instances of the search term. Notice that I am running this through pdb. 24 results means that the script calls create_supercut_in_batches(). create_supercut_in_batches() then calls create_supercut() inside a try/except block which in turn calls demo_supercut() whose sole function seems to be to print out the details of each clip (start, end, line). All this works fine and I get the list printed to my screen for the first 20 clips, and then again for the next 4 clips. This is where I'm lost. All of this is happening inside the try/except block in create_supercut_in_batches(). What isn't happening are any of the commands in the try block that follow the call to create_supercut(). Here's the code:
So, none of this gets done:
...which means, in turn, that batch_comp is an empty set. The next command following the while loop (inside of which is the try/except block above) calls moviepy:
clips = [VideoFileClip(filename) for filename in batch_comp]
... but batch-comp is an empty set, thus (I guess) generating the max() args error.
Sorry to be so long-winded, but this is an issue that others are having too and this is my best shot at it so far. The problem is I'm stumped. Why don't the commands that follow the call to create_supercut() in the try block get actioned? As I say, I've checked all the white spaces and the tabs etc. I've placed break points on those lines and they just don't get triggered.
Any help, please.
The text was updated successfully, but these errors were encountered: