FreeOpcUa / python-opcua

LGPL Pure Python OPC-UA Client and Server
http://freeopcua.github.io/
GNU Lesser General Public License v3.0
1.35k stars 658 forks source link

Not enough data left in buffer。 #1463

Open EvashuangshuangFeng opened 2 years ago

EvashuangshuangFeng commented 2 years ago

Nested structure:

await client.load_type_definitions() after = await struct.read_value() File "C:\Program Files\Python38\lib\site-packages\asyncua\ua\ua_binary.py", line 73, in unpack b = _Bytes.unpack(data) File "C:\Program Files\Python38\lib\site-packages\asyncua\ua\ua_binary.py", line 61, in unpack return data.read(length) File "C:\Program Files\Python38\lib\site-packages\asyncua\common\utils.py", line 59, in read raise NotEnoughData(f"Not enough data left in buffer, request for {size}, we have {self._size}") asyncua.common.utils.NotEnoughData: Not enough data left in buffer, request for 256, we have 95

EvashuangshuangFeng commented 2 years ago
  1. Read nested structure fails with string datatype.
  2. When I delete the string datatype, read nested structure succeeds, but the value of structure and controller do not match. image