ait-cs-IaaS / mbans

MODBUS Asherah Nuclear Power Plant Executable with MODBUS server and ferryman. Linux Only at this time.
0 stars 0 forks source link

[FERRYMAN Script] AttributeError: 'ExceptionResponse' object has no attribute 'registers' #1

Open magic-debian opened 4 months ago

magic-debian commented 4 months ago

Hi,

I'm trying to run the ./asherah_npp.sh script but i have the following error:

(mbans) vboxuser@Asherah:~/mbans$ ./asherah_npp.sh 
[MODBUS] Starting Modbus server...
[MODBUS] Success.
## MB_SRV:  Local Modbus server.
## MB_SRV:  Listening in all IP addresses at port 502.

## MB_SRV: Unable to listen to TCP connection.

[ANS_RT] Starting the Asherah Nuclear Simulator!
## MB_SRV: New connection from 127.0.0.1:54980 on socket 5.
## mb_client_connect: Connected to server 127.0.0.1:502.

** starting the model **
[INFO] Attempting to connect to ANS on tcp://127.0.0.1:502...
## MB_SRV: New connection from 127.0.0.1:43413 on socket 6.
## MB_SRV: New connection from 127.0.0.1:36253 on socket 7.
TIME: 1718130436.280838
[SENSOR TRANSMIT] Reading raw value from Asherah : UINT 49529 || 15115281.910429541MPa.
[SENSOR TRANSMIT] Writing value to the PLC : UINT 49529.
Traceback (most recent call last):
  File "/home/vboxuser/mbans/FERRYMAN/ferryman.py", line 168, in <module>
    main()
  File "/home/vboxuser/mbans/lib/python3.9/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/vboxuser/mbans/lib/python3.9/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/vboxuser/mbans/lib/python3.9/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/vboxuser/mbans/lib/python3.9/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/vboxuser/mbans/FERRYMAN/ferryman.py", line 159, in main
    write_control_commands()
  File "/home/vboxuser/mbans/FERRYMAN/ferryman.py", line 61, in write_control_commands
    pzr_main_heater = holding_reg.registers[0]
AttributeError: 'ExceptionResponse' object has no attribute 'registers'
## MB_SRV: Connection closed on socket 6
## MB_SRV: Connection closed on socket 7

Do you know what could be the possible error or how i can debug further ?

Here is my setup:

(mbans) vboxuser@Asherah:~/mbans$ pip list
Package            Version
------------------ --------
certifi            2023.5.7
charset-normalizer 3.2.0
Click              7.0
idna               3.4
pip                20.3.4
pkg-resources      0.0.0
pymodbus           2.5.3
pyserial           3.5
requests           2.31.0
setuptools         44.1.1
six                1.16.0
urllib3            2.0.3
(mbans) vboxuser@Asherah:~/mbans$ ls -l /usr/lib/libmbclient.so 
-rw-r--r-- 1 root root 169296 Jun 11 15:34 /usr/lib/libmbclient.so
(mbans) vboxuser@Asherah:~/mbans$ ls -l /ramdisk/
total 8
-rw-rw-rw- 1 root root  61 Jun 11 20:25 discrete_inputs.txt
-rw-rw-rw- 1 root root 898 Jun 11 20:25 input_registers.txt
Mr-CaoMei commented 2 months ago

I'm the same, have you solved it yet?

magic-debian commented 2 months ago

unfortunately not