laggykiller / sticker-convert

Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, Discord, iMessage. Written in Python.
GNU General Public License v2.0
295 stars 17 forks source link

No module named "av.opaque" in compiled binary? #211

Closed ravindu644 closed 1 week ago

ravindu644 commented 2 weeks ago
[C] Compressing 003.tgs -> 003.webm res=512x512, quality=11, fps=19, color=46 (step 0-8-16)
##### EXCEPTION #####
Function: <compiled_function StickerConvert.convert at 0x0000027CA4A22340>
Arguments: [WindowsPath('C:/Users/ravin/Desktop/stickers_input/000.tgs'), WindowsPath('C:/Users/ravin/Desktop/stickers_output/000'), CompOption(preset='telegram', size_max_img=512000, size_max_vid=256000, format_img=('.png',), format_vid=('.webm',), fps_min=1, fps_max=30, fps_power=-0.3, res_w_min=512, res_w_max=512, res_h_min=512, res_h_max=512, res_power=3.0, quality_min=10, quality_max=95, quality_power=5.0, color_min=32, color_max=257, color_power=3.0, duration_min=0, duration_max=3000, bg_color='', padding_percent=0, steps=16, fake_vid=False, quantize_method='imagequant', scale_filter='bicubic', cache_dir=None, default_emoji='πŸ˜€', no_compress=False, processes=4, animated=None, square=None)]
Traceback (most recent call last):
  File "C:\PROGRA~1\sticker-convert\sticker_convert\job.py", line 121, in worker
  File "C:\PROGRA~1\sticker-convert\sticker_convert\converter.py", line 197, in convert
  File "C:\PROGRA~1\sticker-convert\sticker_convert\converter.py", line 254, in _convert
  File "C:\PROGRA~1\sticker-convert\sticker_convert\converter.py", line 708, in frames_export
  File "C:\PROGRA~1\sticker-convert\sticker_convert\converter.py", line 733, in _frames_export_pyav
  File "C:\PROGRA~1\sticker-convert\av\__init__.py", line 24, in <module av>
  File "C:\PROGRA~1\sticker-convert\av\audio\__init__.py", line 1, in <module av.audio>
  File "av\\audio\\frame.pyx", line 1, in init av.audio.frame
  File "av\\frame.pyx", line 1, in init av.frame
  File "C:\PROGRA~1\sticker-convert\av\codec\__init__.py", line 1, in <module av.codec>
  File "av\\codec\\codec.pyx", line 1, in init av.codec.codec
  File "C:\PROGRA~1\sticker-convert\av\video\__init__.py", line 1, in <module av.video>
  File "av\\video\\frame.pyx", line 1, in init av.video.frame
  File "av\\codec\\context.pyx", line 1, in init av.codec.context
  File "C:\PROGRA~1\sticker-convert\av\container\__init__.py", line 1, in <module av.container>
  File "av\\container\\core.pyx", line 1, in init av.container.core
  File "av\\packet.pyx", line 1, in init av.packet
ModuleNotFoundError: No module named 'av.opaque'
#####################
##### EXCEPTION #####
Function: <compiled_function StickerConvert.convert at 0x000001B9DE45E340>
Arguments: [WindowsPath('C:/Users/ravin/Desktop/stickers_input/002.tgs'), WindowsPath('C:/Users/ravin/Desktop/stickers_output/002'), CompOption(preset='telegram', size_max_img=512000, size_max_vid=256000, format_img=('.png',), format_vid=('.webm',), fps_min=1, fps_max=30, fps_power=-0.3, res_w_min=512, res_w_max=512, res_h_min=512, res_h_max=512, res_power=3.0, quality_min=10, quality_max=95, quality_power=5.0, color_min=32, color_max=257, color_power=3.0, duration_min=0, duration_max=3000, bg_color='', padding_percent=0, steps=16, fake_vid=False, quantize_method='imagequant', scale_filter='bicubic', cache_dir=None, default_emoji='πŸ˜€', no_compress=False, processes=4, animated=None, square=None)]
Traceback (most recent call last):
  File "C:\PROGRA~1\sticker-convert\sticker_convert\job.py", line 121, in worker
  File "C:\PROGRA~1\sticker-convert\sticker_convert\converter.py", line 197, in convert
  File "C:\PROGRA~1\sticker-convert\sticker_convert\converter.py", line 254, in _convert
  File "C:\PROGRA~1\sticker-convert\sticker_convert\converter.py", line 708, in frames_export
  File "C:\PROGRA~1\sticker-convert\sticker_convert\converter.py", line 733, in _frames_export_pyav
  File "C:\PROGRA~1\sticker-convert\av\__init__.py", line 24, in <module av>
  File "C:\PROGRA~1\sticker-convert\av\audio\__init__.py", line 1, in <module av.audio>
  File "av\\audio\\frame.pyx", line 1, in init av.audio.frame
  File "av\\frame.pyx", line 1, in init av.frame
  File "C:\PROGRA~1\sticker-convert\av\codec\__init__.py", line 1, in <module av.codec>
  File "av\\codec\\codec.pyx", line 1, in init av.codec.codec
  File "C:\PROGRA~1\sticker-convert\av\video\__init__.py", line 1, in <module av.video>
  File "av\\video\\frame.pyx", line 1, in init av.video.frame
  File "av\\codec\\context.pyx", line 1, in init av.codec.context
  File "C:\PROGRA~1\sticker-convert\av\container\__init__.py", line 1, in <module av.container>
  File "av\\container\\core.pyx", line 1, in init av.container.core
  File "av\\packet.pyx", line 1, in init av.packet
ModuleNotFoundError: No module named 'av.opaque'
ravindu644 commented 2 weeks ago

Okay.

I fixed it using this way:

pip uninstall av
pip install av --no-cache-dir
laggykiller commented 2 weeks ago

Thank you for reporting, but I don't think your fix work...

I will release new version that fix this issue when https://github.com/Nuitka/Nuitka/pull/3179 is merged to nuitka and new release of nuitka is available.

ravindu644 commented 2 weeks ago

Thank you for reporting, but I don't think your fix work...

I will release new version that fix this issue when Nuitka/Nuitka#3179 is merged to nuitka and new release of nuitka is available.

Now I remember, the way I fixed this issue was by completely uninstalling the sticker-convert app from my Windows PC and using the Python module instead.

laggykiller commented 1 week ago

Downgrade pyav to 13.0.0 and released v2.10.5.

Will upgrade pyav to 13.1.0 when nuitka make new release with patch.

laggykiller commented 17 hours ago

Upgrade pyav again in v2.10.6 as nuitka released new version