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

Bridging sticker fails if emoji related to sticker doesn't have unicodedata name #252

Closed
tulir opened this issue Dec 11, 2018 · 0 comments
Closed
Labels
bug: unclassified Something isn't working and it may or may not have worked in the past
Milestone

Comments

@tulir
Copy link
Member

tulir commented Dec 11, 2018

[2018-12-11 22:37:37,472] [[email protected]] Handling message Message(id=X, to_id=PeerChat(chat_id=X), date=datetime.datetime(2018, 12, 11, X, X, X, tzinfo=datetime.timezone.utc), message='', out=True, mentioned=False, media_unread=False, silent=False, post=False, from_id=X, fwd_from=None, via_bot_id=None, reply_to_msg_id=None, media=MessageMediaDocument(document=Document(id=X, access_hash=X, date=datetime.datetime(2018, X, X, X, X, X, tzinfo=datetime.timezone.utc), mime_type='image/webp', size=X, thumb=PhotoSize(type='s', location=FileLocation(dc_id=X, volume_id=X, local_id=X, secret=X), w=X, h=X, size=X), dc_id=X, version=0, attributes=[DocumentAttributeImageSize(w=X, h=X), DocumentAttributeSticker(alt='\U0001f9d0', stickerset=InputStickerSetID(id=X, access_hash=X), mask=False, mask_coords=None), DocumentAttributeFilename(file_name='sticker.webp')]), ttl_seconds=None), reply_markup=None, entities=[], views=None, edit_date=None, post_author=None, grouped_id=None) to X by X
[2018-12-11 22:37:37,475] [[email protected]] Failed to handle Telegram update
Traceback (most recent call last):
  File "mautrix_telegram/abstract_user.py", line 133, in _update_catch
    await self._update(update)
  File "mautrix_telegram/abstract_user.py", line 189, in _update
    await self.update_message(update)
  File "mautrix_telegram/abstract_user.py", line 382, in update_message
    return await portal.handle_telegram_message(self, sender, update)
  File "mautrix_telegram/portal.py", line 1504, in handle_telegram_message
    response = await self.handle_telegram_document(source, intent, evt, relates_to)
  File "mautrix_telegram/portal.py", line 1343, in handle_telegram_document
    info, name = self._parse_telegram_document_meta(evt, file, attrs)
  File "mautrix_telegram/portal.py", line 1306, in _parse_telegram_document_meta
    name = f"{alt} ({unicodedata.name(alt[0]).lower()})"
ValueError: no such name
>>> unicodedata.name("🧐")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: no such name
@tulir tulir added the bug: unclassified Something isn't working and it may or may not have worked in the past label Dec 11, 2018
@tulir tulir added this to the 0.5.0 milestone Dec 11, 2018
@tulir tulir closed this as completed in 082ef79 Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: unclassified Something isn't working and it may or may not have worked in the past
Development

No branches or pull requests

1 participant