indykoning / PyPi_GrowattServer

MIT License
70 stars 32 forks source link

Can't get api_mix_info to work #68

Open rowanbradley opened 11 months ago

rowanbradley commented 11 months ago

When I try to use api.mix_info, I get this:

  Traceback (most recent call last):
    File "D:\XPS_8700 Extended Files\Users\RowanB\Documents\Inetpub\www.sylvesterbradley.org\public_html\growattxxx.py", line 57, in <module>
      mix_info = api.mix_info(mix_id)
                 ^^^^^^^^^^^^^^^^^^^^
    File "c:\python311\Lib\site-packages\growattServer\__init__.py", line 273, in mix_info
      data = json.loads(response.content.decode('utf-8'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\python311\Lib\json\__init__.py", line 346, in loads
      return _default_decoder.decode(s)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\python311\Lib\json\decoder.py", line 337, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\python311\Lib\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)

  D:\XPS_8700 Extended Files\Users\RowanB\Documents\Inetpub\www.sylvesterbradley.org\public_html>

What am I doing wrong?

Thanks - Rowan

flopp999 commented 8 months ago

I also have this error. I will try to understand what is going wrong