10se1ucgo / cue_sdk

Python wrapper for the Corsair Utility Engine SDK
Other
21 stars 2 forks source link

CUESDK(path) Crashes when CUE is not Installed #11

Closed wmhii closed 5 years ago

wmhii commented 6 years ago

When CUE is not installed the details.serverVersion returns None (as specified on page 29 of the CUE SDK Overview) However, the constructor for class CorsairProtocolDetails still attempts to run .decode() on line 181 throwing an AttributeError

CUESDK() also crashes when CUE is not actively running

After installing CUE, CUESDK initializes without errors.

Traceback:

Corsair = CUESDK(path)
  File "C:\ProgramData\Miniconda3\envs\CUE\lib\site-packages\cue_sdk-2.1.0-py3.6.egg\cue_sdk\api.py", line 78, in __init__
  File "C:\ProgramData\Miniconda3\envs\CUE\lib\site-packages\cue_sdk-2.1.0-py3.6.egg\cue_sdk\api.py", line 21, in wrapper
  File "C:\ProgramData\Miniconda3\envs\CUE\lib\site-packages\cue_sdk-2.1.0-py3.6.egg\cue_sdk\api.py", line 293, in perform_protocol_handshake
  File "C:\ProgramData\Miniconda3\envs\CUE\lib\site-packages\cue_sdk-2.1.0-py3.6.egg\cue_sdk\structures.py", line 182, in __new__
AttributeError: 'NoneType' object has no attribute 'decode'
wmhii commented 6 years ago

Am I misinterpreting how the SDK works? Does it talk through the CUE?

wmhii commented 6 years ago

Seems to be the case that the underlying SDK needs the CUE server to be running. I apologize for any wasted time.

10se1ucgo commented 5 years ago

This is a bad way to fail anyways, I will have to fix this to error in a more descriptive way when I find time motivation.