Open FilipDominec opened 3 years ago
I agree, there is a strong downside to Instrumental's approach of trying to make things "just work" automatically, because this can easily lead to confusion (especially for beginners) when something isn't working.
The currently prescribed method for diagnosing these list_instruments
issues is to enable logging, which will tell you which driver modules could be loaded, etc. But I think you bring up two good points:
I'm hesitant to add verbose output by default, but we can
verbose
arg or a second, verbose version of the functionverbose
arg to list_instruments
.verbose=True
by default: Newcomers will intuitively get acquainted with the autodetection, experienced users can easily silence it and they will mostly use direct initialization instrument('12345')
anyway.COM1
or /dev/ttyS0
. But I can see that "serial" is already established in many existing drivers for serial number, so the transition can be hard. Hello, I am the starter you talked about. I am using a laptop running Win10 and a NI DAQ is connected. I can use it well by NI Max software or vendor-provided library (NI-DAQmx Pytthon). But instrumental tell me
>>> list_instruments()
/home/dominecf/p/Instrumental/instrumental/drivers/motion/ecc100.py:24: UserWarning: Driver 'instrumental.drivers.motion.ecc100' is out of date and incompatible with the current Instrumental core. Pull requests fixing this are welcome.
warnings.warn(
[]
>>>
I checked the FAQ, should I ignore this? otherwise what do I need to do?
I will try to issue a Pull Request for this. But currently it is hard for me to test Instrumental with real instrumentation as I am either fully occupied in the lab, or on home office. Please be patient.
I've already started working verbose list_instruments()
output, so don't worry about it @FilipDominec. However, @richyjunior, that output is not strictly needed for your specific problem. If you have a problem with a particular driver, you can import it directly to see any errors:
>>> from instrumental.drivers.daq import ni
I know the documentation currently recommends using instrument()
rather than importing the driver modules directly, but my opinion on this has been changing.
Check out PR #133, where I've added verbose output. Let me know what you think.
Instrumental has implemented a user-friendly module initialization, which auto-detects all available devices and silently skips all options that aren't available.
However, this user-friendliness fades away when everything seems installed properly, a device is attached and found by external commands (like
lsusb
on Linux), but it does not appear in the listing:On my notebook, I could use the TDC001 controllers flawlessly. On my desktop PC, now I have no clue what to do except for digging deep into the code with a debugger. FAQ does not help a bit. I suggest there should be some diagnostics.
By this I mean a function that recursively prints out
Maybe such a verbose printout should be even the default behaviour. Otherwise, a beginner can become completely lost.