growatt_api_client icon indicating copy to clipboard operation
growatt_api_client copied to clipboard

Exception when launching venv/bin/python -m growatt <user> <password>

Open achimera opened this issue 5 years ago • 2 comments

Hi, I've executed all steps but when launching to connect to my growatt server, I receive the following exception. User and password are correct.

``_Traceback (most recent call last): File "/Users/achimera/dev/growatt_api_client/growatt/init.py", line 71, in login result = self._back_success_response(response) File "/Users/achimera/dev/growatt_api_client/growatt/init.py", line 147, in _back_success_response raise GrowattApiError() growatt.GrowattApiError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in run_code exec(code, run_globals) File "/Users/achimera/dev/growatt_api_client/growatt/main.py", line 9, in api.login(username, password) File "/Users/achimera/dev/growatt_api_client/growatt/init.py", line 75, in login raise LoginError``

achimera avatar Mar 04 '20 08:03 achimera

This happens when the Growatt API returns a valid JSON response indicating that the login attempt was not succesful. This usually happens when the username or password is incorrect. Please check your credentials and put them between 'single quotes' to prevent your shell from messing up the arguments.

Sjord avatar Mar 04 '20 08:03 Sjord

Hi Sjoerd, yes, single quoting the user and the password was the trick! Now I'm able to access. Thanks!

achimera avatar Mar 04 '20 09:03 achimera