meshtastic / python

The Python CLI and API for talking to Meshtastic devices
https://meshtastic.org
370 stars 157 forks source link

get network vomits #635

Open zl3ag opened 2 months ago

zl3ag commented 2 months ago

Running latest 2.3.14 version (thanks for fixing that other problem in .13 BTW!

meshtastic --port /dev/ttyACM0 --dest '!25c2f43c' --get network Connected to radio Requesting current config from remote node (this can take a while).

ERROR file:stream_interface.py reader line:175 Error while handling message from radio Assignment not allowed to message, map, or repeated field "ipv4_config" in protocol message object. Traceback (most recent call last): File "/root/.local/pipx/venvs/meshtastic/lib/python3.11/site-packages/meshtastic/stream_interface.py", line 173, in reader self._handleFromRadio(self._rxBuf[HEADER_LEN:]) File "/root/.local/pipx/venvs/meshtastic/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 926, in _handleFromRadio self._handlePacketFromRadio(fromRadio.packet) File "/root/.local/pipx/venvs/meshtastic/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1186, in _handlePacketFromRadio handler.callback(asDict) File "/root/.local/pipx/venvs/meshtastic/lib/python3.11/site-packages/meshtastic/node.py", line 119, in onResponseRequestSettings setattr(config_values, camel_to_snake(key), value) AttributeError: Assignment not allowed to message, map, or repeated field "ipv4_config" in protocol message object. Completed getting preferences

ianmcorvidae commented 2 months ago

Ah, looks like there's some issues with the nested field there; I suspect without stuff in ipv4_config it still works. We should figure out how to extract that information from the protobuf classes to handle this sort of thing automatically; hopefully that's possible.

ianmcorvidae commented 1 day ago

It will need testing, but this is probably fixed with 2.5 (which I am about to go click the button to release), made some changes to how this handler works.