Skip to content

KeyError: -7 #18

@ulipoto

Description

@ulipoto

I used python -m easy_biologic.find_devices in the terminal to find my potentiostat and got "VMP3: USB0" as a result. Using that for bl = ebl.BiologicDevice('VMP3: USB0') does not work.
The error received is:
EcError: ERR_COMM_CONNECTIONFAILED (-201): Could not establish communication with instrument.

Using only "USB0" returns KeyError: -7. And apparently, error -7 does not exist in the error list.

The Biologic USB driver is installed and the EC-lab software works fine with USB connection. I'm using the Biologic VMP3B-10 potentiostat.

Do I maybe use the wrong keyword with 'USB0'?

Code:

import easy_biologic as ebl
import easy_biologic.base_programs as blp

bl = ebl.BiologicDevice('USB0')

Full error:

File "C:\ProgramData\Anaconda3\lib\site-packages\easy_biologic\lib\ec_errors.py", line 108, in __init__
    ( code, message ) = EcError.errors[ value ]

KeyError: -7

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "D:\Python\untitled0.py", line 12, in <module>
    bl = ebl.BiologicDevice('USB0')

  File "C:\ProgramData\Anaconda3\lib\site-packages\easy_biologic\device.py", line 61, in __init__
    self.populate_info()

  File "C:\ProgramData\Anaconda3\lib\site-packages\easy_biologic\device.py", line 209, in populate_info
    self.connect()

  File "C:\ProgramData\Anaconda3\lib\site-packages\easy_biologic\device.py", line 178, in connect
    ecl.init_channels(

  File "C:\ProgramData\Anaconda3\lib\site-packages\easy_biologic\lib\ec_lib.py", line 864, in init_channels
    validate( err )

  File "C:\ProgramData\Anaconda3\lib\site-packages\easy_biologic\lib\ec_lib.py", line 1615, in validate
    raise EcError( err )

  File "C:\ProgramData\Anaconda3\lib\site-packages\easy_biologic\lib\ec_errors.py", line 111, in __init__
    raise ValueError( f'Unknown error value {value}.' )

ValueError: Unknown error value -7.`
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions