Just recently, after installation with "pip install ismrmrd", the ismrmrd import fails with a TypeError in the ismrmrdschema (see Traceback below). I assume this is due to problems with xsdata. One solution is to manually install xsdata with "pip install xsdata[cli]==21.11" and afterwards install the ismrmrd-python with "python setup.py install".
File "/home/ehsesp/miniconda3/bin/ismrmrdviewer", line 5, in <module>
from ismrmrdviewer.__main__ import main
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrdviewer/__main__.py", line 3, in <module>
import ismrmrdviewer.ui as ui
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrdviewer/ui/__init__.py", line 2, in <module>
from .MainWindow import MainWindow
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrdviewer/ui/MainWindow.py", line 8, in <module>
from .FileWidget import FileWidget
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrdviewer/ui/FileWidget.py", line 2, in <module>
import ismrmrd
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrd/__init__.py", line 7, in <module>
from .file import File
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrd/file.py", line 8, in <module>
from .xsd import ToXML
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrd/xsd/__init__.py", line 1, in <module>
from .pyxb_compat import (CreateFromDocument, ToXML, ToDOM)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrd/xsd/pyxb_compat.py", line 1, in <module>
from .ismrmrdschema import ismrmrdHeader
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrd/xsd/ismrmrdschema/__init__.py", line 1, in <module>
from .ismrmrd import (
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrd/xsd/ismrmrdschema/ismrmrd.py", line 606, in <module>
class encodingSpaceType:
File "/home/ehsesp/miniconda3/lib/python3.8/site-packages/ismrmrd/xsd/ismrmrdschema/ismrmrd.py", line 615, in encodingSpaceType
fieldOfViewMm: Optional[fieldOfViewMm] = field(
File "/home/ehsesp/miniconda3/lib/python3.8/typing.py", line 261, in inner
return func(*args, **kwds)
File "/home/ehsesp/miniconda3/lib/python3.8/typing.py", line 364, in __getitem__
arg = _type_check(parameters, "Optional[t] requires a single type.")
File "/home/ehsesp/miniconda3/lib/python3.8/typing.py", line 149, in _type_check
raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: Optional[t] requires a single type. Got Field(name=None,type=None,default=None,default_factory=<dataclasses._MISSING_TYPE object at 0x7fdddb.```