Nd2 image file reader - 'pyav_reader' problem
gkanfer opened this issue · 1 comments
gkanfer commented
I am trying to run the library nd2reader for reading Nikon image files (Nd2)
The command
from nd2reader import ND2Reader
and I got this error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-87768f93039f> in <module>
----> 1 from nd2reader import ND2Reader
C:\ProgramData\Anaconda3\envs\3daStorm\lib\site-packages\nd2reader\__init__.py in <module>
1 from os import path
----> 2 from nd2reader.reader import ND2Reader
3 from nd2reader.legacy import Nd2
4
5 try:
C:\ProgramData\Anaconda3\envs\3daStorm\lib\site-packages\nd2reader\reader.py in <module>
----> 1 from pims import Frame
2 from pims.base_frames import FramesSequenceND
3
4 from nd2reader.exceptions import EmptyFileError, InvalidFileType
5 from nd2reader.parser import Parser
C:\ProgramData\Anaconda3\envs\3daStorm\lib\site-packages\pims\__init__.py in <module>
----> 1 from pims.api import *
2
3 from ._version import get_versions
4 __version__ = get_versions()['version']
5 del get_versions
C:\ProgramData\Anaconda3\envs\3daStorm\lib\site-packages\pims\api.py in <module>
35 try:
36 import pims.pyav_reader
---> 37 if pims.pyav_reader.available():
38 PyAVReaderTimed = pims.pyav_reader.PyAVReaderTimed
39 PyAVReaderIndexed = pims.pyav_reader.PyAVReaderIndexed
AttributeError: module 'pims' has no attribute 'pyav_reader'
GenevieveBuckley commented
If I were you, I would first check:
- If the version of pims you have is compatible with your version of nd2reader (I'd probably look at what nd2reader says it needs in the requirements and/or setup.py files, as well as double checking that you have the most recent version of nd2reader)
- If you installed the optional dependencies to use pims with PyAV (see this page in the docs, you'll need ffmpeg and PyAV installed)