Skip to content

json.decoder.JSONDecodeError from api.inverter_detail(inverter_id) #95

@aspiringguru

Description

@aspiringguru

new user to growattServer. just started exploring the available functions.
appears to be json.decoder.JSONDecodeError - possibly json format returned has changed?

$ python -V
Python 3.12.3
$ pip freeze | grep growattServer
growattServer==1.6.0
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
(ubuntu app on windows)

api.inverter_detail('xxxxxxx')
Traceback (most recent call last):
File "/mnt/d/2025/coding/electricity/alphaess_1/env/lib/python3.12/site-packages/requests/models.py", line 974, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/mnt/d/2025/coding/electricity/alphaess_1/env/lib/python3.12/site-packages/growattServer/init.py", line 258, in inverter_detail
return response.json()
^^^^^^^^^^^^^^^
File "/mnt/d/2025/coding/electricity/alphaess_1/env/lib/python3.12/site-packages/requests/models.py", line 978, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions