Error loading CEBO-STICK API in Python 3.8.3

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Error loading CEBO-STICK API in Python 3.8.3

      Hi all,

      I have recently purchased a CEBO-STICK (C028210) and am currently trying to read out an analog voltage with python (version 3.8.3).

      When downloading the "cebomsrapi-windows-1.7.zip" archive from the web page and executing the python example "SingleIoExmaples.py" I got the following error:


      File "C:\Users\Tobias\anaconda3\lib\ctypes\__init__.py", line 373, in __init__

      self._handle = _dlopen(self._name, mode)

      FileNotFoundError: Could not find module 'cebomsr-1.7-x86_64.dll' (or one of its dependencies). Try using the full path with constructor syntax.



      This message already occurs when solely trying to import the api, i.e., using only the following line:


      Quellcode

      1. from CeboMsrApiPython import LibraryInterface, DeviceType
      Is anybody aware of a solution to this problem?

      EDIT: I should probably mention that I copied the "cebomsr-1.7-x86_64.dll" both to the folder where the python script is started as well as to "C:\Users\Tobias\anaconda3\lib\ctypes\" without any effect and that I'm running a 64-bit Windows 10 Pro system. Also, I did install the "CeboDriver1.0.1" driver.

      Thanks for your help and best wishes,
      Tobias

      Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von Tobias () aus folgendem Grund: Question clarification

    • Hello Tobias,

      I could reproduce your error with Python 3.9.1 here. The DLL loading mechanism
      has changed with Python 3.8 and 3.9. To make our shipped Python library
      CeboMsrApiPython.py work with Python 3.8 and 3.9, you can replace the line

      _library = cdll.LoadLibrary(_getLibraryName())

      with the two lines

      os.add_dll_directory(os.path.dirname(__file__))
      _library = cdll.LoadLibrary(_getLibraryName())

      Then you need to add the line

      import os

      at the beginning where the other import lines are. Then it should work again.
      We will update our CeboMsrApi libraries with new versions accordingly.

      Best regards

      Manfred Radimersky
      Software Development
      Cesys GmbH
    • Hello Tobias,

      you may try our new 2.0.x API, which does not require any additional external dll/so/dylib-files (as they were temporary extracted and loaded on startup). I've tested on Python 3.9.x and it seems to work. Code hasn't changed that much from 1.7, just language interfacing from C++ to Python/Java. So should be working as stable as 1.7.
      Just a note: Due to the fact that 32 bit systems are rare nowadays, 32 bit support has been dropped, so an 64 Bit OS + 64 Bit Python Interpreter is assumed.

      You can download this version from here: CeboMSR API 2.0.1.0

      Any feedback is very welcome,

      Best regards,
      Thomas
      Software development
      Cesys GmbH