Trying to use an enum in Python 3.7.3, getting the following error. Already tried to install - and uninstall - enum34, but it still does not work. Did all the operations in a virtual environment (as the error shows).
Is there anything else I can do to fix this (except using another enum implementation as shown in this question)?
#enum import:
from enum import Enum
# enum definition:
class Status(Enum):
on: 1
off: 2
# enum utilisation (another class, same file):
self.status = Status.off
# error:
File "C:\dev\python\test\venv\lib\enum.py", line 349, in __getattr__
AttributeError(name) from None
AttributeError: off