Closed seanson closed 2 years ago
I get the same issue on macos.
videogrep --input meta.mp4 --search 'experience'
Traceback (most recent call last):
File "/opt/homebrew/bin/videogrep", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/lib/python3.9/site-packages/videogrep/cli.py", line 146, in main
videogrep(
File "/opt/homebrew/lib/python3.9/site-packages/videogrep/videogrep.py", line 472, in videogrep
segments = search(files, query, search_type)
File "/opt/homebrew/lib/python3.9/site-packages/videogrep/videogrep.py", line 207, in search
transcript = parse_transcript(file, prefer=prefer)
File "/opt/homebrew/lib/python3.9/site-packages/videogrep/videogrep.py", line 61, in parse_transcript
subfile = find_transcript(videoname, prefer)
File "/opt/homebrew/lib/python3.9/site-packages/videogrep/videogrep.py", line 32, in find_transcript
all_files = [f.path for f in os.scandir(os.path.dirname(videoname)) if f.is_file()]
FileNotFoundError: [Errno 2] No such file or directory: ''
When running on a file in the same directory in Windows, the
os.path.dirname
returns''
, which fails withos.scandir
raising the errorFileNotFoundError: [WinError 3] The system cannot find the path specified: ''
Working in subdirectory:
Failing in same directory: