Closed sam-astro closed 9 months ago
More specifically, this is the error it gives:
Debug: Temp Directory: /tmp/tmp2lryxod5
Traceback (most recent call last):
File "/home/sam/.local/bin/auto-editor", line 8, in <module>
sys.exit(main())
File "/home/sam/.local/lib/python3.8/site-packages/auto_editor/__main__.py", line 391, in main
edit_media(paths, ffmpeg, args, temp, log)
File "/home/sam/.local/lib/python3.8/site-packages/auto_editor/edit.py", line 242, in edit_media
timeline = make_timeline(
File "/home/sam/.local/lib/python3.8/site-packages/auto_editor/timeline.py", line 99, in make_timeline
chunks, vclips, aclips = make_layers(
File "/home/sam/.local/lib/python3.8/site-packages/auto_editor/make_layers.py", line 144, in make_layers
has_loud = get_has_loud(method, src, ensure, strict, tb, bar, temp, log)
File "/home/sam/.local/lib/python3.8/site-packages/auto_editor/method.py", line 156, in get_has_loud
audio_levels(ensure, inp, s, tb, bar, strict, temp, log),
File "/home/sam/.local/lib/python3.8/site-packages/auto_editor/analyze.py", line 166, in audio_levels
if (arr := read_cache(src, tb, "audio", {"stream": s}, temp)) is not None:
File "/home/sam/.local/lib/python3.8/site-packages/auto_editor/analyze.py", line 103, in read_cache
cache = json.load(file)
File "/usr/lib/python3.8/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 19463006 (char 19463005)
And the solution to fix this issue is to delete the file /tmp/ae-22w39a/
for this version with the command:
sudo rm -r /tmp/ae-22w39a/
You're using a release that's almost a year old. We don't even support Python 3.9 or ffmpeg 4 anymore.
Bug description
This has happened multiple times to me, where the process may have stopped or another problem occurred, and the cache file was written to with no content. Then, the next time the auto-editor is run, it obviously failed to decode it as json, because the file is blank. So the only way to fix it is by deleting the cache file manually in the
/tmp/
directory. A very simple check could fix this, just seeing if the contents of the file is valid json (which in this case could be done by seeing if the file length is > 0)What's your platform?
What command did you use
What properties does your input video have?
(This does not apply, as it breaks for all videos, due to the nature of this bug)
Comments
No response