Skip to content

Wish: More descriptive initialization #132

@FilipDominec

Description

@FilipDominec

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:

dominecf@machine:~/p/Instrumental $ sudo python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from instrumental import instrument, list_instruments
>>> 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(
[]
>>> 

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

  1. which drivers were loaded (and no hardware was found), and
  2. which in contrast were skipped due to insufficient dependencies.

Maybe such a verbose printout should be even the default behaviour. Otherwise, a beginner can become completely lost.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions