You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.5.3 export to json was ok, starting with 0.6.0 give below error
pi@raspberrypi:~ $ mate3 read --host 192.168.0.150 -f json >mate3_060.json
2021-01-10 19:35:24.682 | WARNING | mate3.api:_read_model:165 - Error reading field gateway_type - so setting as not implemented. Message: 3 is not a valid gateway_type
2021-01-10 19:35:24.701 | WARNING | mate3.api:_read_model:165 - Error reading field inverter_operating_mode - so setting as not implemented. Message: 12 is not a valid inverter_operating_mode
Traceback (most recent call last):
File "/home/pi/.local/bin/mate3", line 8, in <module>
sys.exit(main())
File "/home/pi/.local/lib/python3.7/site-packages/mate3/main.py", line 199, in main
read(client, args)
File "/home/pi/.local/lib/python3.7/site-packages/mate3/main.py", line 59, in read
print(json.dumps(devices, indent=indent))
File "/usr/lib/python3.7/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.7/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.7/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type FieldValue is not JSON serializable
The text was updated successfully, but these errors were encountered:
chinezbrun
changed the title
0.6.0 - export to json not working
export to json not working
Jan 10, 2021
0.5.3 export to json was ok, starting with 0.6.0 give below error
Good spotting! I added basic CLI tests in 0.6.1 (as the previous tests weren't checking the CLI), but only did the basic stuff for now (i.e. reading to text format). I'm glad I did that, 'cos now I've added in a test that reproduced this error (i.e. reading to json), and fixed it in #29 .
0.5.3 export to json was ok, starting with 0.6.0 give below error
The text was updated successfully, but these errors were encountered: