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
261 stars 14 forks source link

"No module named 'uploaders'" while generating wastickers file #46

Closed makley273 closed 1 year ago

makley273 commented 1 year ago

Bug description

Unable to create wastickers file (from Telegram Stickers)

Tested on Linux, with Version 2.0.4 & 2.0.5 Appimage and through pip install on python 3.9

Console output

[S] Successful compression 117.webp -> 117.webp (step 0)                                
[S] Successful compression 113.webp -> 113.webp (step 0)                                
100%|█████████████████████████████████████████████████| 120/120 [00:12<00:00,  9.65it/s]
Exporting...
Exception in thread Thread-1 (start_process):
Traceback (most recent call last):
  File "/tmp/.mount_stickechpqRa/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/tmp/.mount_stickechpqRa/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/tmp/.mount_stickechpqRa/usr/src/sticker_convert/gui.py", line 374, in start_process
    success = flow.start()
              ^^^^^^^^^^^^
  File "/tmp/.mount_stickechpqRa/usr/src/sticker_convert/flow.py", line 63, in start
    success = task()
              ^^^^^^
  File "/tmp/.mount_stickechpqRa/usr/src/sticker_convert/flow.py", line 382, in export
    self.out_urls += exporter(
                     ^^^^^^^^^
  File "/tmp/.mount_stickechpqRa/usr/src/sticker_convert/uploaders/compress_wastickers.py", line 127, in start
    return exporter.compress_wastickers()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_stickechpqRa/usr/src/sticker_convert/uploaders/compress_wastickers.py", line 73, in compress_wastickers
    packs = MetadataHandler.split_sticker_packs(self.in_dir, title=title, file_per_pack=30, separate_image_anim=not self.fake_vid)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_stickechpqRa/usr/src/sticker_convert/utils/metadata_handler.py", line 119, in split_sticker_packs
    stickers_present = MetadataHandler.get_stickers_present(dir)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_stickechpqRa/usr/src/sticker_convert/utils/metadata_handler.py", line 11, in get_stickers_present
    from uploaders.xcode_imessage import XcodeImessageIconset
ModuleNotFoundError: No module named 'uploaders'

A possible solution

Change line 11 of metadata_handler.py from

from uploaders.xcode_imessage import XcodeImessageIconset

to

from ..uploaders.xcode_imessage import XcodeImessageIconset

laggykiller commented 1 year ago

Thanks for your report, fixed v2.0.7