w1ll1am23 / pyeconet

Python 3 interface to the EcoNet API
MIT License
34 stars 20 forks source link

Version 0.1.20 TEST program says invalid email or password (but they're correct) #34

Closed bpowell2008 closed 1 year ago

bpowell2008 commented 1 year ago

Describe the bug Running the test program in the SRC directory; I'm getting a "username / email" incorrect error. I've confirmed via my phone app that my email / password is correct.

To Reproduce Steps to reproduce the behavior:

  1. PIP install pyeconet
  2. Copied test program from SRC into new file in IDLE
  3. Saved and ran program
  4. Entered valid email / password
  5. Error below (invalid credentials)

Expected behavior I expected the username / password to work

Screenshots

DEBUG:pyeconet.api:{'options': {'message': 'Incorrect Email id or Password', 'success': False}, 'user_id': '<USER_ID>', 'user_token': '<AUTH_TOKEN>'}
Traceback (most recent call last):
  File "/usr/lib/python3.10/idlelib/run.py", line 578, in runcode
    exec(code, self.locals)
  File "/config/Nextcloud/Programming/Python/econet test.py", line 40, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/config/Nextcloud/Programming/Python/econet test.py", line 17, in main
    api = await EcoNetApiInterface.login(email, password=password)
  File "/config/.local/lib/python3.10/site-packages/pyeconet/api.py", line 79, in login
    await this_class._authenticate({"email": email, "password": password})
  File "/config/.local/lib/python3.10/site-packages/pyeconet/api.py", line 244, in _authenticate
    raise InvalidCredentialsError(_json.get("options")["message"])
pyeconet.errors.InvalidCredentialsError: Incorrect Email id or Password

Additional context I'm relatively new to python. I'm running this on a Linux machine.

bpowell2008 commented 1 year ago

Please disregard. After another password reset round on the phone, the library is working now as expected.

Thank you!