NSLS-II / Bug-Reports

Unified issue-tracker for bugs in the data acquisition, management, and analysis software at NSLS-II
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

Ophyd cannot import name 'FileStoreBulkWrite' #181

Open yugangzhang opened 6 years ago

yugangzhang commented 6 years ago

We are trying to use xspress3 at 11id. I found we are actually using hxntools for controlling xspress3, here is the code

  2                                       ZebraPulse,
  3                                       ZebraFrontOutput12,
  4                                       ZebraFrontOutput3,
  5                                       ZebraFrontOutput4,
  6                                       ZebraRearOutput,
  7                                       ZebraGate,
  8                                       ZebraAddresses)
  9 
 10 from hxntools.detectors.xspress3 import (XspressTrigger,
 11                                          Xspress3Detector,
 12                                          Xspress3Channel)

In the new dev env, we don't install hxntools, so I conda install hxtools first. After that, when running the above import code, I got an error message,

In [751]: %run -i /home/xf11id/.ipython/profile_collection/startup/98-xspress3.py
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
~/.ipython/profile_collection/startup/98-xspress3.py in <module>()
----> 1 from hxntools.detectors.zebra import (EpicsSignalWithRBV, 
      2                                       ZebraPulse,
      3                                       ZebraFrontOutput12,
      4                                       ZebraFrontOutput3,
      5                                       ZebraFrontOutput4,

~/conda_envs/dev/lib/python3.6/site-packages/hxntools/detectors/__init__.py in <module>()
----> 1 from .timepix import (TimepixDetector, HxnTimepixDetector)
      2 from .xspress3 import (Xspress3Detector, Xspress3HDF5Handler)
      3 from .zebra import (HxnZebra, Zebra)
      4 from .merlin import HxnMerlinDetector
      5 from .beamstatus import BeamStatusDetector

~/conda_envs/dev/lib/python3.6/site-packages/hxntools/detectors/timepix.py in <module>()
     12 from ophyd.areadetector import (EpicsSignalWithRBV as SignalWithRBV, CamBase)
     13 from .utils import makedirs
---> 14 from .trigger_mixins import (HxnModalTrigger, FileStoreBulkReadable)
     15 
     16 

~/conda_envs/dev/lib/python3.6/site-packages/hxntools/detectors/trigger_mixins.py in <module>()
      6                           Component as Cpt, Device)
      7 from ophyd import (Signal, )
----> 8 from ophyd.areadetector.filestore_mixins import FileStoreBulkWrite
      9 
     10 from filestore.api import bulk_insert_datum

ImportError: cannot import name 'FileStoreBulkWrite' 

I tried to conda update ophyd, but it did not help. Please advise.

licode commented 6 years ago

hxntools needs to be updated. working on it...

afluerasu commented 6 years ago

Looks like things are working! Thanks @licode et al.

licode commented 6 years ago

Sure. I think you are using the old bsui now. However, we still prefer to move to the new bsui api. We are updating hxntools, so soon you can move back to -dev environment with new api features.