RayVentura / ShortGPT

πŸš€πŸŽ¬ ShortGPT - Experimental AI framework for youtube shorts / tiktok channel automation
https://shortx.ai/?ref=sgpt
MIT License
5.78k stars 734 forks source link

πŸ› [Bug]: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 845: character maps to <undefined> #132

Open linhcentrio opened 8 months ago

linhcentrio commented 8 months ago

What happened?

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 845: character maps to

What type of browser are you seeing the problem on?

Chrome

What type of Operating System are you seeing the problem on?

Windows

Python Version

python 3.11

Application Version

v0.1.3

Expected Behavior

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 845: character maps to

Error Message

Running on local URL:  http://0.0.0.0:31415

To create a public link, set `share=True` in `launch()`.
Video file C:\Users\Admin\AppData\Local\Temp\gradio\93ab877a770af7c60eaac186f2715b4e99692434\test.mp4
Step 1 _transcribe_audio
Video file C:\Users\Admin\AppData\Local\Temp\gradio\93ab877a770af7c60eaac186f2715b4e99692434\test.mp4
Exception in thread Thread-8 (_readerthread):
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1568, in _readerthread
    buffer.append(fh.read())
                  ^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 845: character maps to <undefined>
Failed getting the duration of the asked ressource the JSON object must be str, bytes or bytearray, not NoneType
Failed getting duration from the following video/audio url/path using yt_dlp. Unable to handle request: Unsupported url scheme: "c" (requests, urllib)

The url/path C:\Users\Admin\AppData\Local\Temp\gradio\93ab877a770af7c60eaac186f2715b4e99692434\test.mp4 does not point to a video/ audio. Impossible to extract its duration
Detected language: Vietnamese
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 11765/11765 [00:17<00:00, 678.32frames/s]
Step 2 _translate_content
Translating content: 5it [00:17,  3.54s/it]
Step 3 _generate_translated_audio
Generating translated audio: 0it [00:00, ?it/s]ffmpeg version N-112260-gb6e5136ba3-20231002 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.0 (crosstool-NG 1.25.0.232_c175b21)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20231002
  libavutil      58. 27.100 / 58. 27.100
  libavcodec     60. 27.100 / 60. 27.100
  libavformat    60. 13.100 / 60. 13.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  4.100 /  7.  4.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[mp3 @ 0000020632411b80] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_0_English.wav':
  Duration: 00:00:03.19, start: 0.000000, bitrate: 48 kb/s
  Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 48 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_0_English_spedup.wav':
  Metadata:
    ISFT            : Lavf60.13.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s
    Metadata:
      encoder         : Lavc60.27.100 pcm_s16le
[out#0/wav @ 000002063241a740] video:0kB audio:131kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.058167%
size=     131kB time=00:00:02.76 bitrate= 387.9kbits/s speed= 102x
Generating translated audio: 1it [00:01,  1.10s/it]ffmpeg version N-112260-gb6e5136ba3-20231002 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.0 (crosstool-NG 1.25.0.232_c175b21)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20231002
  libavutil      58. 27.100 / 58. 27.100
  libavcodec     60. 27.100 / 60. 27.100
  libavformat    60. 13.100 / 60. 13.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  4.100 /  7.  4.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[mp3 @ 00000253e6898580] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_1_English.wav':
  Duration: 00:00:37.51, start: 0.000000, bitrate: 48 kb/s
  Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 48 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_1_English_spedup.wav':
  Metadata:
    ISFT            : Lavf60.13.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s
    Metadata:
      encoder         : Lavc60.27.100 pcm_s16le
[out#0/wav @ 00000253e6877340] video:0kB audio:1717kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.004436%
size=    1717kB time=00:00:36.61 bitrate= 384.1kbits/s speed= 259x
Generating translated audio: 2it [00:05,  3.23s/it]ffmpeg version N-112260-gb6e5136ba3-20231002 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.0 (crosstool-NG 1.25.0.232_c175b21)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20231002
  libavutil      58. 27.100 / 58. 27.100
  libavcodec     60. 27.100 / 60. 27.100
  libavformat    60. 13.100 / 60. 13.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  4.100 /  7.  4.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[mp3 @ 000001c369d521c0] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_2_English.wav':
  Duration: 00:00:32.66, start: 0.000000, bitrate: 48 kb/s
  Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 48 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_2_English_spedup.wav':
  Metadata:
    ISFT            : Lavf60.13.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s
    Metadata:
      encoder         : Lavc60.27.100 pcm_s16le
[out#0/wav @ 000001c369d67500] video:0kB audio:1629kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.004677%
size=    1629kB time=00:00:34.71 bitrate= 384.4kbits/s speed= 265x
Generating translated audio: 3it [00:09,  3.38s/it]ffmpeg version N-112260-gb6e5136ba3-20231002 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.0 (crosstool-NG 1.25.0.232_c175b21)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20231002
  libavutil      58. 27.100 / 58. 27.100
  libavcodec     60. 27.100 / 60. 27.100
  libavformat    60. 13.100 / 60. 13.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  4.100 /  7.  4.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[mp3 @ 000001e563e82900] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_3_English.wav':
  Duration: 00:00:16.66, start: 0.000000, bitrate: 48 kb/s
  Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 48 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_3_English_spedup.wav':
  Metadata:
    ISFT            : Lavf60.13.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s
    Metadata:
      encoder         : Lavc60.27.100 pcm_s16le
[out#0/wav @ 000001e563e99c00] video:0kB audio:672kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.011336%
size=     672kB time=00:00:14.30 bitrate= 384.9kbits/s speed= 199x
Generating translated audio: 4it [00:12,  3.08s/it]ffmpeg version N-112260-gb6e5136ba3-20231002 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.0 (crosstool-NG 1.25.0.232_c175b21)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20231002
  libavutil      58. 27.100 / 58. 27.100
  libavcodec     60. 27.100 / 60. 27.100
  libavformat    60. 13.100 / 60. 13.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  4.100 /  7.  4.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[mp3 @ 000002113fe29ac0] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_4_English.wav':
  Duration: 00:00:19.10, start: 0.000000, bitrate: 48 kb/s
  Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 48 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '.editing_assets/content_translation_assets/551374b33ff249928bca5784/translated_4_English_spedup.wav':
  Metadata:
    ISFT            : Lavf60.13.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s
    Metadata:
      encoder         : Lavc60.27.100 pcm_s16le
[out#0/wav @ 000002113fe07c40] video:0kB audio:936kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.008139%
size=     936kB time=00:00:19.94 bitrate= 384.4kbits/s speed= 227x
Generating translated audio: 5it [00:14,  2.89s/it]
Step 4 _edit_and_render_video
Exception in thread Thread-33 (_readerthread):
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1568, in _readerthread
    buffer.append(fh.read())
                  ^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 845: character maps to <undefined>
Failed getting the duration of the asked ressource the JSON object must be str, bytes or bytearray, not NoneType
Failed getting duration from the following video/audio url/path using yt_dlp. Unable to handle request: Unsupported url scheme: "c" (requests, urllib)

The url/path C:\Users\Admin\AppData\Local\Temp\gradio\93ab877a770af7c60eaac186f2715b4e99692434\test.mp4 does not point to a video/ audio. Impossible to extract its duration
Exception in thread Thread-35 (_readerthread):
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1568, in _readerthread
    buffer.append(fh.read())
                  ^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 845: character maps to <undefined>
Failed getting the duration of the asked ressource the JSON object must be str, bytes or bytearray, not NoneType
Failed getting duration from the following video/audio url/path using yt_dlp. Unable to handle request: Unsupported url scheme: "c" (requests, urllib)

The url/path C:\Users\Admin\AppData\Local\Temp\gradio\93ab877a770af7c60eaac186f2715b4e99692434\test.mp4 does not point to a video/ audio. Impossible to extract its duration
Error   File "D:\ShortGPT\gui\ui_tab_video_translation.py", line 86, in translate_video
    for step_num, step_info in content_translation_engine.makeContent():
  File "D:\ShortGPT\shortGPT\engine\abstract_content_engine.py", line 74, in makeContent
    self.stepDict[currentStep]()
  File "D:\ShortGPT\shortGPT\engine\multi_language_translation_engine.py", line 106, in _edit_and_render_video
    if video_length - last_t2 >4:

Code to produce this issue.

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 845: character maps to <undefined>

Screenshots/Assets/Relevant links

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 845: character maps to

Anil-matcha commented 1 month ago

Here is an alternative which is maintained https://github.com/SamurAIGPT/Text-To-Video-AI