cubert-hyperspectral / cuvis.sdk

Apache License 2.0
14 stars 2 forks source link

Installing SDK on Ubuntu 22.04 #67

Open saqibshakil opened 1 week ago

saqibshakil commented 1 week ago

I installed the sdk on Ubuntu 22.04, and install the cuvis==3.3.0 using pip but the application failed because the CUVIS and CUVIS_DATA environment variables we not set

After setting it to /usr/lib/cuvis I end up at below error

Exception has occurred: AttributeError module 'cuvis_il' has no attribute 'loglevel_debug'

My base code work on Ubuntu 20.04 with cuvis 3.2.3

BenMGeo commented 1 week ago

Hi @saqibshakil There was some code breaking name changes from 3.2 to 3.3. Please check the code base for further insights.

saqibshakil commented 1 week ago

The error occurs at import of cuvis so not a problem in the code. And where can I find a list of a list of breaking changes

BenMGeo commented 1 week ago

Usually, they are documented in the release notes on the cuvis SDK download page.

When cuvis is imported cuvis_il is imported that translates CPP/C SDK to python. If there is such an error on import, the most probable issue is that any package (base SDK, cuvis_il, cuvis) is not the version it should be. Can you provide the example as a txt output?

saqibshakil commented 5 days ago

So I have tried installing both sdk the cuda and noncuda for amd64 and have the same issue on both that /usr/bin does not have a cuvis folder where as /etc/cuvis has a couple of empty folder named factory and user

image

(base) dev@insp-emb:~/work/cuvis.python.examples$ python3 EX07_recordVideoFromSessionFile.py 
CUVIS environmental variable is not set!
(base) dev@insp-emb:~/work/cuvis.python.examples$ export CUVIS_DATA=/usr/bin/cuvis
(base) dev@insp-emb:~/work/cuvis.python.examples$ python3 EX07_recordVideoFromSessionFile.py 
CUVIS environmental variable is not set!
(base) dev@insp-emb:~/work/cuvis.python.examples$ export CUVIS=/usr/bin/cuvis
(base) dev@insp-emb:~/work/cuvis.python.examples$ python3 EX07_recordVideoFromSessionFile.py 
Traceback (most recent call last):
  File "/home/dev/work/cuvis.python.examples/EX07_recordVideoFromSessionFile.py", line 7, in <module>
    import cuvis
  File "/home/dev/miniconda3/lib/python3.12/site-packages/cuvis/__init__.py", line 20, in <module>
    from .AcquisitionContext import AcquisitionContext
  File "/home/dev/miniconda3/lib/python3.12/site-packages/cuvis/AcquisitionContext.py", line 2, in <module>
    from .Async import Async, AsyncMesu
  File "/home/dev/miniconda3/lib/python3.12/site-packages/cuvis/Async.py", line 2, in <module>
    from .Measurement import Measurement
  File "/home/dev/miniconda3/lib/python3.12/site-packages/cuvis/Measurement.py", line 2, in <module>
    from .FileWriteSettings import SaveArgs
  File "/home/dev/miniconda3/lib/python3.12/site-packages/cuvis/FileWriteSettings.py", line 2, in <module>
    from .cuvis_aux import SDKException
  File "/home/dev/miniconda3/lib/python3.12/site-packages/cuvis/cuvis_aux.py", line 3, in <module>
    import cuvis.cuvis_types as internal
  File "/home/dev/miniconda3/lib/python3.12/site-packages/cuvis/cuvis_types.py", line 8, in <module>
    logging.DEBUG: cuvis_il.loglevel_debug,
                   ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'cuvis_il' has no attribute 'loglevel_debug'
(base) dev@insp-emb:~/work/cuvis.python.examples$ ls /usr/bin/cu*
/usr/bin/cupstestppd  /usr/bin/curl  /usr/bin/cut
birkholz-cubert commented 4 days ago

Can you try setting the environment variable to export CUVIS="/lib/cuvis"

saqibshakil commented 4 days ago

Same result Traceback (most recent call last): File "/home/dev/work/cuvis.python.examples/EX07_recordVideoFromSessionFile.py", line 7, in import cuvis File "/home/dev/work/cuvis.python.examples/.conda/lib/python3.10/site-packages/cuvis/init.py", line 20, in from .AcquisitionContext import AcquisitionContext File "/home/dev/work/cuvis.python.examples/.conda/lib/python3.10/site-packages/cuvis/AcquisitionContext.py", line 2, in from .Async import Async, AsyncMesu File "/home/dev/work/cuvis.python.examples/.conda/lib/python3.10/site-packages/cuvis/Async.py", line 2, in from .Measurement import Measurement File "/home/dev/work/cuvis.python.examples/.conda/lib/python3.10/site-packages/cuvis/Measurement.py", line 2, in from .FileWriteSettings import SaveArgs File "/home/dev/work/cuvis.python.examples/.conda/lib/python3.10/site-packages/cuvis/FileWriteSettings.py", line 2, in from .cuvis_aux import SDKException File "/home/dev/work/cuvis.python.examples/.conda/lib/python3.10/site-packages/cuvis/cuvis_aux.py", line 3, in import cuvis.cuvis_types as internal File "/home/dev/work/cuvis.python.examples/.conda/lib/python3.10/site-packages/cuvis/cuvis_types.py", line 8, in logging.DEBUG: cuvis_il.loglevel_debug, AttributeError: module 'cuvis_il' has no attribute 'loglevel_debug'

saqibshakil commented 3 days ago

I am waiting on a solution for this