Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
achimera opened this issue Mar 4, 2020 · 2 comments
Open

Comments

@achimera
Copy link

achimera commented Mar 4, 2020

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
``

@Sjord
Copy link
Owner

Sjord commented Mar 4, 2020

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 added a commit that referenced this issue Mar 4, 2020
That gives slightly more information in case something goes wrong. However, it
currently only reports something like "errCode: 102", and we don't know what
that means.

This was motivated by issue #6.
@achimera
Copy link
Author

achimera commented Mar 4, 2020

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

Sjord added a commit that referenced this issue Mar 4, 2020
This was the problem in #6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants