You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So when execution goes through L1167, the conversion fails and we get the following exception stack:
Traceback (most recent call last):
File "c:\PixivUtil2\PixivImageHandler.py", line 333, in process_image
PixivDownloadHandler.handle_ugoira(image, filename, config, notifier)
File "c:\PixivUtil2\PixivDownloadHandler.py", line 384, in handle_ugoira
PixivHelper.ugoira2gif(ugo_name,
File "c:\PixivUtil2\PixivHelper.py", line 954, in ugoira2gif
convert_ugoira(ugoira_file,
File "c:\PixivUtil2\PixivHelper.py", line 1052, in convert_ugoira
check_image_encoding(d)
File "c:\PixivUtil2\PixivHelper.py", line 1145, in check_image_encoding
re_encode_image(re_encode_channel, file)
File "c:\PixivUtil2\PixivHelper.py", line 1170, in re_encode_image
p = subprocess.Popen(ffmpeg_args, stderr=subprocess.PIPE)
File "C:\Program Files\Python38\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\Python38\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
File "c:\Users\username\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydev_bundle\pydev_monkey.py", line 860, in new_CreateProcess
return getattr(_subprocess, original_name)(app_name, cmd_line, *args)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Which is expected since it cannot find ffmpeg.exe. Most ugoiras won't invoke re_encode_image which is missing the path, so the problem rarely shows up, if ever.
I fixed the problem by hardcoding my ffmpeg's path at L1167. I guess the proper way to fix this would probably be passing the path into the function as a parameter.
On a side note, the above exception would crash the program. Not sure whether it's meant to be the case.
The text was updated successfully, but these errors were encountered:
PixivUtil2/PixivHelper.py
Line 1167 in da4c615
As you can see,
cmd
is built using just "ffmpeg" without any path to it, vs here where it is dynamically resolved:PixivUtil2/PixivHelper.py
Line 1016 in da4c615
So when execution goes through L1167, the conversion fails and we get the following exception stack:
Which is expected since it cannot find ffmpeg.exe. Most ugoiras won't invoke
re_encode_image
which is missing the path, so the problem rarely shows up, if ever.I fixed the problem by hardcoding my ffmpeg's path at L1167. I guess the proper way to fix this would probably be passing the path into the function as a parameter.
On a side note, the above exception would crash the program. Not sure whether it's meant to be the case.
The text was updated successfully, but these errors were encountered: