Comments (6)
Guess you haven't authorized before connecting
from pyworxcloud.
Mmmh.
I tried setting the three environment variables and analternativly hard coded them into test.py
In both ways setup.py didn't complain about missing credentials.
That should be enough, shouldn't it?
from pyworxcloud.
I can confirm there is a issue.
Using either the script pyworxcloud/blob/master/test.py or pyworxcloud/blob/master/test_async.py and by using my credentials:
EMAIL = "[email protected]" # environ["EMAIL"]
PASS = "notdisclosed" # environ["PASSWORD"]
TYPE = "worx" # environ["TYPE"]
I am getting the same Error message:
`2023-04-02 13:24:58,130 [init.py] [init] [DEBUG] [153] Initializing EventHandler ...
2023-04-02 13:24:58,131 [init.py] [connect] [DEBUG] [233] Fetching basic API data
Traceback (most recent call last):
File "C:\Users\plane\PycharmProjects\pyworx\venv\Lib\site-packages\pyworxcloud\utils\requests.py", line 73, in GET
req.raise_for_status()
File "C:\Users\plane\PycharmProjects\pyworx\venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.worxlandroid.com/api/v2/product-items?status=1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\plane\AppData\Roaming\JetBrains\PyCharmCE2022.3\scratches\scratch_1.py", line 51, in
asyncio.run(main())
File "C:\Program Files\Python\Python_311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Program Files\Python\Python_311\Lib\asyncio\runners.py", line 118, in run
return self.loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python\Python_311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\plane\AppData\Roaming\JetBrains\PyCharmCE2022.3\scratches\scratch_1.py", line 20, in main
await async_worx()
File "C:\Users\plane\AppData\Roaming\JetBrains\PyCharmCE2022.3\scratches\scratch_1.py", line 28, in async_worx
cloud.connect()
File "C:\Users\plane\PycharmProjects\pyworx\venv\Lib\site-packages\pyworxcloud_init.py", line 234, in connect
self.fetch()
File "C:\Users\plane\PycharmProjects\pyworx\venv\Lib\site-packages\pyworxcloud_init.py", line 496, in _fetch
self._mowers = self._api.get_mowers()
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\plane\PycharmProjects\pyworx\venv\Lib\site-packages\pyworxcloud\api.py", line 102, in get_mowers
mowers = GET(
^^^^
File "C:\Users\plane\PycharmProjects\pyworx\venv\Lib\site-packages\pyworxcloud\utils\requests.py", line 79, in GET
raise AuthorizationError()
pyworxcloud.exceptions.AuthorizationError`
from pyworxcloud.
Yeah - as mentioned (somewhere) the test files and documentation isn't up to par with version 3 at the moment.
But a valid connection sequence should be something like this
cloud = WorxCloud(email, password, vendor)
cloud.authenticate()
cloud.connect()
from pyworxcloud.
Yes, that's it!
-> simply a missing line in setup.pi
With a bit of twiddling it is displaying all the relevant data.
Thank you very much!
I would - if I knew how - update setup.py so that it should work for other users as well.
from pyworxcloud.
Will be updated when the last few problems are fixed
from pyworxcloud.
Related Issues (20)
- Request: More stable API HOT 6
- How do I define "CloudType" and the WorxCloud object HOT 3
- Issue installing this in home assistant HOT 4
- Needs to import mqtt from awsiotsdk, not awsiot HOT 28
- MQTT connection is not automatically reconnected on drop/errors HOT 1
- Error initializing an account with multiple mowers
- Missing handling of timeout
- Not aligned requirements file HOT 1
- Python version requirement HOT 8
- Can I use this as a bridge HOT 3
- last_status is None HOT 4
- Loading fails when missing last_status HOT 2
- How to send mover to specific zone HOT 11
- AttributeError: 'Client' object has no attribute '_on_pre_connect'. Did you mean: 'on_pre_connect'? HOT 9
- Firmware version is no longer a floating point number and parsing fails as a result HOT 2
- enhancement: handle Cloudflare Turnstile interception HOT 2
- Question - how can i write current api data to a file HOT 11
- Internal mower state not updated when update message is received HOT 1
- BUG: unhandled exception if no gps key stops MQTT data receive
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyworxcloud.