I have been using the nptdms
module to do analysis of TDMS files without issue for several years. Recently, I got an error when trying to read a TDMS file for the first time. I import TdmsFile
from nptdms
:
from nptdms import TdmsFile
I try to read it:
tdms_file = TdmsFile.read(path_to_my_tdms_file)
and then get the following error:
type object 'TdmsFile' has no attribute 'read'
I am using python v3.6.10, with Anaconda and the nptdms v0.12.0.
The method you are referring to exists in the current documentation so it would make sense to
conda activate <name of your env>
).If this does not help...
Reinstall the package:
conda remove nptdms
conda install nptdms
(the exact commands may differ depending on your environment).
If this does not help, create a fresh conda environment and install from scratch and check again.