Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't send sticker with .webp extension #29

Open
galihmrd opened this issue May 28, 2024 · 3 comments
Open

Can't send sticker with .webp extension #29

galihmrd opened this issue May 28, 2024 · 3 comments

Comments

@galihmrd
Copy link

Logs:

app[worker.1]: Exception ignored on calling ctypes callback function: <bound method Event.execute of <neonize.events.Event object at 0x7fbe5f20f560>>
2024-05-28T21:04:06.840274+00:00 app[worker.1]: Traceback (most recent call last):
2024-05-28T21:04:06.840276+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.12/site-packages/neonize/events.py", line 129, in execute
2024-05-28T21:04:06.840423+00:00 app[worker.1]:     self.list_func[code](binary, size)
2024-05-28T21:04:06.840456+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.12/site-packages/neonize/events.py", line 149, in serialization
2024-05-28T21:04:06.840544+00:00 app[worker.1]:     f(self.client, event.FromString(ctypes.string_at(binary, size)))
2024-05-28T21:04:06.840574+00:00 app[worker.1]:   File "/app/main.py", line 39, in on_message
2024-05-28T21:04:06.840662+00:00 app[worker.1]:     message_handler(client, message)
2024-05-28T21:04:06.840686+00:00 app[worker.1]:   File "/app/src/modules/handler.py", line 51, in message_handler
2024-05-28T21:04:06.840744+00:00 app[worker.1]:     Func.tele_to_wa_sticker(client, msg)
2024-05-28T21:04:06.840768+00:00 app[worker.1]:   File "/app/src/modules/func.py", line 314, in tele_to_wa_sticker
2024-05-28T21:04:06.840892+00:00 app[worker.1]:     client.send_sticker(
2024-05-28T21:04:06.840902+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.12/site-packages/neonize/client.py", line 733, in send_sticker
2024-05-28T21:04:06.841103+00:00 app[worker.1]:     self.build_sticker_message(file, quoted, name, packname),
2024-05-28T21:04:06.841328+00:00 app[worker.1]:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-28T21:04:06.841337+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.12/site-packages/neonize/client.py", line 683, in build_sticker_message
2024-05-28T21:04:06.841489+00:00 app[worker.1]:     img = Image.open(io_save)
2024-05-28T21:04:06.841597+00:00 app[worker.1]:           ^^^^^^^^^^^^^^^^^^^
2024-05-28T21:04:06.841619+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.12/site-packages/PIL/Image.py", line 3339, in open
2024-05-28T21:04:06.842207+00:00 app[worker.1]:     raise UnidentifiedImageError(msg)
2024-05-28T21:04:06.842239+00:00 app[worker.1]: PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7fbe5f3ef1f0>
@krypton-byte
Copy link
Owner

Are you sure that the file you want to turn into a sticker is an image file? According to your log, the Pillow library couldn't detect it as an image file.

@galihmrd
Copy link
Author

galihmrd commented May 29, 2024

Are you sure that the file you want to turn into a sticker is an image file? According to your log, the Pillow library couldn't detect it as an image file.

Yes, that's an image file, But when I send with the same code but with .webm extension, it works

@galihmrd
Copy link
Author

Are you sure that the file you want to turn into a sticker is an image file? According to your log, the Pillow library couldn't detect it as an image file.

Yes, that's an image file, But when I send with the same code but with .webm extension, it works

IMG_20240529_105558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants