fedora-infra / maubot-pretix-invite

A maubot plugin for inviting event participants from the pretix ticketing platform into a matrix room
MIT License
2 stars 0 forks source link

import string #6

Closed HarHarLinks closed 2 weeks ago

HarHarLinks commented 2 weeks ago

https://github.com/MoralCode/maubot-events/blob/7738a7ebe962652b173813da3f626a46be0ac039/event_helper/matrix_utils.py#L63C36-L63C58

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/mautrix/client/syncer.py", line 236, in _catch_errors
    await handler(data)
  File "/opt/maubot/maubot/handlers/command.py", line 154, in __call__
    return await self.__mb_func__(self.__bound_instance__, evt, **call_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/plugins/org.fedoraproject.maubot.events-v0.2.0-ts1718541753439.mbp/event_helper/__init__.py", line 257, in batchinvite
    failed_invites = self.invite_attendees(room_id, data)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/plugins/org.fedoraproject.maubot.events-v0.2.0-ts1718541753439.mbp/event_helper/__init__.py", line 213, in invite_attendees
    validated_id = validate_matrix_id(matrix_id)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/plugins/org.fedoraproject.maubot.events-v0.2.0-ts1718541753439.mbp/event_helper/matrix_utils.py", line 63, in validate_matrix_id
    allowable_characters = Counter(string.ascii_lowercase + string.digits + "-.=_/+" + "@:")
                                   ^^^^^^
NameError: name 'string' is not defined
MoralCode commented 2 weeks ago

Resolved by the same fix as #4, closing as its sort-of a duplicate issue