Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read DIO status #4

Open
JayeshEngibrains opened this issue Jul 26, 2024 · 0 comments
Open

Unable to read DIO status #4

JayeshEngibrains opened this issue Jul 26, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@JayeshEngibrains
Copy link

I am trying to read DIO for my application but I am running into execption attached below in below provided example. Actual path from error has been removed for anonamity.
https://github.com/BloomyControls/BS1200-Python-Driver/blob/main/tests/dio_test.py

We are using below version of software
bs1200 - 1.3.6
python -3.7.8

..\venv\Scripts\python.exe ..\dio.py
..\venv\lib\site-packages\paramiko\pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"cipher": algorithms.TripleDES,
..\venv\lib\site-packages\paramiko\transport.py:259: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"class": algorithms.TripleDES,
Fan Status: No Fault
Temp Sensor 1: 30 °C
Temp Sensor 2: 30 °C
Temp Sensor 3: 29 °C
Traceback (most recent call last):
File "..\dio.py", line 10, in
ai_v = bs.readback_ai_all(box)
File "..\venv\lib\site-packages\bs1200\driver.py", line 380, in readback_ai_all
ai_volts[channel-1] = self.scale_volts(int.from_bytes(rx_frames[frame].data[start:end], 'little'), True)
AttributeError: 'NoneType' object has no attribute 'data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "..\dio.py", line 22, in
print("DIO1:\t{:b} | DIO2:\t{:b} | DIO3:\t{:b} | DIO4:\t{:b} \nDIO5:\t{:b} | DIO6:\t{:b} | DIO7:\t{:b} | DIO8:\t{:b}".format(*bs.readback_dio(box)))
File "..\venv\lib\site-packages\bs1200\driver.py", line 51, in exit
sys.tracebacklimit.print_exception(exception_type, execption_val, tb)
AttributeError: module 'sys' has no attribute 'tracebacklimit'

Process finished with exit code 1

@willeccles willeccles assigned willeccles and mishakh and unassigned willeccles Jul 29, 2024
@willeccles willeccles added the bug Something isn't working label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants