AttributeError: 'XSOEnumMixin' object has no attribute 'name'
daniarla opened this issue · comments
Description of the bug
I just updated to fedora 38 and I'm having this issue when trying to run moodle-dl as expected in my normal setup.
Even running moodle-dl --help has the same issue.
`Traceback (most recent call last):
File "/usr/lib64/python3.11/enum.py", line 260, in __set_name__
enum_member._value_ = enum_class._member_type_(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/aioxmpp/xso/model.py", line 2923, in __init__
self.xso_class = self._create_class()
^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/aioxmpp/xso/model.py", line 2933, in _create_class
self._create_name(),
^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.11/site-packages/aioxmpp/xso/model.py", line 2926, in _create_name
return "".join(map(str.title, self.name.split("_")))
^^^^^^^^^
AttributeError: 'XSOEnumMixin' object has no attribute 'name'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/user/.local/bin/moodle-dl", line 5, in <module>
from moodle_dl.main import main
File "/home/user/.local/lib/python3.11/site-packages/moodle_dl/main.py", line 23, in <module>
from moodle_dl.cli import (
File "/home/user/.local/lib/python3.11/site-packages/moodle_dl/cli/__init__.py", line 7, in <module>
from moodle_dl.cli.notifications_wizard import NotificationsWizard
File "/home/user/.local/lib/python3.11/site-packages/moodle_dl/cli/notifications_wizard.py", line 3, in <module>
from aioxmpp.errors import StanzaError, UserError
File "/home/user/.local/lib/python3.11/site-packages/aioxmpp/__init__.py", line 101, in <module>
from .errors import ( # NOQA
File "/home/user/.local/lib/python3.11/site-packages/aioxmpp/errors.py", line 109, in <module>
class ErrorCondition(structs.CompatibilityMixin, xso.XSOEnumMixin, enum.Enum):
File "/usr/lib64/python3.11/enum.py", line 557, in __new__
raise exc
File "/usr/lib64/python3.11/enum.py", line 266, in __set_name__
raise new_exc
TypeError: _value_ not set in __new__, unable to create it
Steps to reproduce the issue
Run moodle-dl normally
Technical details
- OS: Fedora 38
- Moodle-DL Version 2.3.18
xD I somehow have the feeling we should move away from aioxmpp
Can confirm, just upgraded moodle-dl as I haven't done so in months. Same error as @daniarla occurs when running moodle-dl.
Do you have an estimate when this bug is fixed or where it first occurred? I tried downgrading to the last minor release but still not luck. The very original 2.0 works for me
I think it is a bug with aioxmpp I guess it should work with versions that do not use aioxmpp. But I can make a fix tonight or tomorrow. I would also welcome if someone does a PR, we could just make a try except to handle the import error of aioxmpp for now, and I would also welcome a move to python-nbxmpp https://dev.gajim.org/gajim/python-nbxmpp
since that is used by thousends of users it should be more stable.
just for the record the first version with aioxmpp is 2.2.0.0
https://github.com/C0D3D3V/Moodle-DL/releases/tag/v2.2.0.0
@C0D3D3V I'm not able to pinpoint where exactly the error occurs. Would you be able to point me into the right direction?
Please test if the latest release, fixes the issue
Please test if the latest release, fixes the issue
It does!