Skip to content

ImportError: cannot import name '_get_valid_format' from 'astropy.io.registry'

Created by: ssalam21

I try to read .gwf files by gwpy in the conda environ. So I use the line from gwpy.timeseries import TimeSeries from gwpy.time import from_gps from astropy.time import Time import numpy as np and the gor the error message ImportError: cannot import name '_get_valid_format' from 'astropy.io.registry'.

Probably, its the path issue my python path is ~/Fr/Python/ and gwpy/astropy has a path here ~/miniconda3/envs/myenv/lib/python3.9/site-packages/astropy/io/registry/__init__.py. Can anyone suggest me any suggestion/solutions? Thanks