Skip to content

katdal does not work with python 3.12 #379

@spassmoor

Description

@spassmoor

When opening a rdb file with katdal in python 3.12 I get the error

    173 def load_from_file(self, file: Union[_PathType, BinaryIO]) -> int:
    174     if rdb_reader is None:
--> 175         raise _rdb_reader_import_error   # noqa: F821
    176     with self._write():
    177         return rdb_reader.load_from_file(MemoryCallback(self._data), file)

NameError: name `_rdb_reader_import_error' is not defined

This is caused by katsdptelstate trying to import distutils in a try..except block giving the error ModuleNotFoundError: No module named 'distutils' that is not reported.
distutils was Deprecate in python 3.10 and removed in python 3.12
https://peps.python.org/pep-0632/

I needed to install setuptools to fix this.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions