from .mailtm import MailTM
File "C:\Users\Tal A. Baskin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mailtm\mailtm.py", line 6, in <module>
from .schemas.domains import Domains, Domain
File "C:\Users\Tal A. Baskin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mailtm\schemas\domains.py", line 14, in <module>
class Domains(BaseModel):
File "C:\Users\Tal A. Baskin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mailtm\schemas\domains.py", line 16, in Domains
hydra_member: list[Domain] = Field(alias="hydra:member")
TypeError: 'type' object is not subscriptable
From my limited research as I don't really have enough time to do all of it, this problem can be fixed by simply changing the imports in domains.py
and message.py
from
Above at the top of every file where arbitrary types are used, and as a suggestion to make this run on more Python version I'd avoid using stuff like list[str]
, It takes maybe 1 more line or 2 to validate if an element, my solution did seem to fix it for me as I am using Python 3.8.7 for this project.
I have no confirmed the integrity of the code as in, will it run or not. But I will try, If I encounter more errors I will document them here, If at all possible.