mabuchilab / Instrumental

Python-based instrumentation library from the Mabuchi Lab.
http://instrumental-lib.readthedocs.org/
GNU General Public License v3.0
120 stars 80 forks source link

Remote client fails when trying to unpack empty message #125

Open natezb opened 3 years ago

natezb commented 3 years ago

I'm working with a remote Thorlabs UC480 camera and having a similar error - no issue with internal channels, but getting TypeError: 'NoneType' object is not iterable. When I define a camera c using c = instrument(paramsets[0]), then go to take an image with it c.grab_image(), I get the attached traceback. The c.grab_image() command has worked for me before, but has been throwing this error recently and I'm not sure how to debug it.

Screen Shot 2020-12-03 at 12 01 17 PM

I'd appreciate any advice in understanding/solving this, thank you in advance!

Originally posted by @mankapandey in https://github.com/mabuchilab/Instrumental/issues/61#issuecomment-738277791

NitramC commented 3 years ago

Just taking a wild guess based on the error and context: I was having a similar issue when getting/setting Facets defined in a class within an Instrument class (the inner class did not inherit from Instrument). The problem was that the "name" property of the Facet was not automatically generated, because the inner class did not inherit from Instrument. Luckily you had a name property that could be manually set. Maybe that's the problem, but again, just a stab in the dark.