Closed komailo closed 3 years ago
Looks like that UnboundLocalError was fixed in https://github.com/arraylabs/pymyq/commit/4f2504e7d69a4c085f8c10e89cc488e667155ef9#diff-6e0d351264188252026200e130afc8ffe6a9e78d42b8d3aa4e840b94180a7166 - it really should have been in a separate commit, though - was harder to find than it should have been!
Why you're getting "Connection reset by peer", I'm not sure.
BTW, if you think you updated to 2.0.12 but still saw that UnboundLocalError, you didn't actually update to 2.0.12.
[root@ott-dockerpool-01 home_assistant]# docker exec -ti home_assistant pip3 install pymyq --upgrade
Requirement already up-to-date: pymyq in /usr/local/lib/python3.8/site-packages (2.0.12)
Requirement already satisfied, skipping upgrade: async-timeout in /usr/local/lib/python3.8/site-packages (from pymyq) (3.0.1)
Requirement already satisfied, skipping upgrade: aiodns in /usr/local/lib/python3.8/site-packages (from pymyq) (2.0.0)
Requirement already satisfied, skipping upgrade: aiohttp in /usr/local/lib/python3.8/site-packages (from pymyq) (3.7.1)
Requirement already satisfied, skipping upgrade: pycares>=3.0.0 in /usr/local/lib/python3.8/site-packages (from aiodns->pymyq) (3.1.1)
Requirement already satisfied, skipping upgrade: yarl<2.0,>=1.0 in /usr/local/lib/python3.8/site-packages (from aiohttp->pymyq) (1.4.2)
Requirement already satisfied, skipping upgrade: typing-extensions>=3.6.5 in /usr/local/lib/python3.8/site-packages (from aiohttp->pymyq) (3.7.4.3)
Requirement already satisfied, skipping upgrade: chardet<4.0,>=2.0 in /usr/local/lib/python3.8/site-packages (from aiohttp->pymyq) (3.0.4)
Requirement already satisfied, skipping upgrade: multidict<7.0,>=4.5 in /usr/local/lib/python3.8/site-packages (from aiohttp->pymyq) (5.1.0)
Requirement already satisfied, skipping upgrade: attrs>=17.3.0 in /usr/local/lib/python3.8/site-packages (from aiohttp->pymyq) (19.3.0)
Requirement already satisfied, skipping upgrade: cffi>=1.5.0 in /usr/local/lib/python3.8/site-packages (from pycares>=3.0.0->aiodns->pymyq) (1.14.4)
Requirement already satisfied, skipping upgrade: idna>=2.0 in /usr/local/lib/python3.8/site-packages (from yarl<2.0,>=1.0->aiohttp->pymyq) (2.10)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python3.8/site-packages (from cffi>=1.5.0->pycares>=3.0.0->aiodns->pymyq) (2.20)
WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
It seems the version is up to date inside the container and still seeing the error. It might be that something is not picking up the correct version.
The upgrade command above seems to suggest its updating the path that is being used by Home Assistant.
Let me raise a issue with Home Assistant to get them to update the library.
Already done by https://github.com/home-assistant/core/pull/44328
Yup just saw that and verified that the dev version of Home Assistant has 2.0.12 and MyQ is also working perfectly.
So for others, just run the dev version till home-assistant/core#44328 makes it to a stable release.
Thanks @dseven
Using Home Assistant 2020.12.1 that comes with pymyq==2.0.11. Unable to configure MyQ integration and getting this error.
I tried manually updating to pymyq==2.0.12 but seeing the same error.
The indentation seems off in: /usr/local/lib/python3.8/site-packages/pymyq/api.py line 114 which I tried fixing and then I saw another error which adds some more info:
2020-12-26 14:36:27 ERROR (MainThread) [pymyq.api] Error requesting data from https://api.myqdevice.com/api/v5/Login: [Errno 104] Connection reset by peer