antiboredom/videogrep

FileNotFoundError: [Errno 2] No such file or directory: '' not finding subtitles

wkrettek opened this issue · 7 comments

This seems like a very basic issue but I can't figure out what's causing it. I'm running video grep on a file and it can't seem to find to proper transcript. I've tested with a .vtt file and the .json file generated with --transcribe (transcription still works). Anybody else run into this issue and have tips?

Traceback (most recent call last):
  File "/home/warren/.local/bin/videogrep", line 8, in <module>
    sys.exit(main())
  File "/home/warren/.local/lib/python3.10/site-packages/videogrep/cli.py", line 146, in main
    videogrep(
  File "/home/warren/.local/lib/python3.10/site-packages/videogrep/videogrep.py", line 472, in videogrep
    segments = search(files, query, search_type)
  File "/home/warren/.local/lib/python3.10/site-packages/videogrep/videogrep.py", line 207, in search
    transcript = parse_transcript(file, prefer=prefer)
  File "/home/warren/.local/lib/python3.10/site-packages/videogrep/videogrep.py", line 61, in parse_transcript
    subfile = find_transcript(videoname, prefer)
  File "/home/warren/.local/lib/python3.10/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: ''

hi - can you paste in the full command you're typing?

Command is videogrep -i puzzle.mp4 -s "hot dish"

Thanks! also can you check what version of videogrep you're running and make sure it's the most recent?

Yeah, I just keep a copy of the repo. Just pulled again. Using poetry shell then switching into a new working directory. --version returns 2.1.1

Hmm - the latest version should be 2.1.2 (there was definitely a bug about finding transcripts in 2.1.1)

Upgraded to 2.1.2 from PyPi and and it works now! What probably happened is I was using the older version through my global videogrep, even though I was shelled into the repo, so it was probs my fault! Thanks!

Glad it’s working now!