RuntimeError: Starting input device system: Unknown error -1

Hello,
I am using lightonml version 1.4.0 on the Aurora E system.
I am trying to setup a simple OPU device to perform a linear transformation operation but I get the following error on instantiating the OPU:

In [1]: import lightonml

In [2]: opu = lightonml.OPU(n_components=10)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-2-907f5b2883ad> in <module>
----> 1 opu = lightonml.OPU(n_components=10)

~/data/condaenv/ckm/lib/python3.9/site-packages/lightonml/opu.py in __init__(self, n_components, opu_device, max_n_features, config_file, config_override, verbose_level, input_roi_strategy, open_at_init, disable_pbar, simulated)
    172             open_at_init = get_host_option("lightonml_open_at_init", True)
    173         if open_at_init:
--> 174             self.open()
    175 
    176     def _tr_settings(self, no_input=False, **override) -> TransformSettings:

~/data/condaenv/ckm/lib/python3.9/site-packages/lightonml/opu.py in open(self)
    538         if self.device.active:
    539             return
--> 540         self.device.open()
    541         # initial reservation for giving batch transforms a buffer ready to use
    542         self.device.reserve(self._s.n_samples_by_pass)

~/data/condaenv/ckm/lib/python3.9/site-packages/lightonml/internal/device.py in open(self)
    138         # noinspection PyPep8
    139         try:
--> 140             self.__opu.open(self._frametime_us_off, self._exposure_us_off,
    141                             self._sequence_nb_prelim, self.verbose)
    142 

RuntimeError: Starting input device system: Unknown error -1

I think that I was able to instantiate an OPU with the same procedure earlier but somehow, it doesn’t work anymore. Sorry to send you so many messages, I can’t figure anything by myself… :frowning:

Hi again,

Sorry for this. It looks like something is wrong with the OPU right now, I have reset it for you, can you retry? A quick test is to run opu_test from the shell.

Maybe the error has to do with your condaenv, can you start one from opu-base with conda create --clone opu-base -n envname? Also if you keep your ckm environment untouched I can use it to investigate on what’s going on.

Best,

Charles

2 Likes

Thanks!
So first of all, I will keep the ckm environment as it is right now so you can do whatever you want with it :slight_smile: . Note that I installed the lightonopu library by doing pip install lightonopu.

Then I tried to clone the opu-base environment using the command you provided. The opu_test went well and my little test also. However, I couldn’t manage to install anything with pip. Indeed, when I tried to use pip, I got the following error:

Traceback (most recent call last):
  File "/home/lgiffon/data/condaenv/ckm2/bin/pip3", line 7, in <module>
    from pip._internal.cli.main import main
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 8, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/cli/cmdoptions.py", line 22, in <module>
    from pip._internal.cli.progress_bars import BAR_TYPES
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/cli/progress_bars.py", line 9, in <module>
    from pip._internal.utils.logging import get_indentation
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/utils/logging.py", line 14, in <module>
    from pip._internal.utils.misc import ensure_dir
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 29, in <module>
    from pip._internal.locations import get_major_minor_version, site_packages, user_site
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
    from . import _distutils, _sysconfig
  File "/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/locations/_sysconfig.py", line 8, in <module>
    from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid
ImportError: cannot import name 'InvalidSchemeCombination' from 'pip._internal.exceptions' (/home/lgiffon/data/condaenv/ckm2/lib/python3.7/site-packages/pip/_internal/exceptions.py)

I did not really understand why this version of pip does not work but I found a fix here: https://stackoverflow.com/a/67606149/4803860

1 Like

Thanks Luc, I updated pip accordingly with the mentioned fix

Cheers,

Charles

1 Like