Open thex1le opened 1 week ago
Hmm, pydantic shouldn't need to know where Client is, because Client isn't a model. I think the fix is to stop pydantic from trying to evaluate the annotations of private attributes.
However to be frankly honest with you, I'm taking a lot of classes this semester, and don't have the bandwidth to fix this immediately.
I might be able to get to it by next Saturday, or sometime before then.
No worries, this is nothing critical and if I get some spare cycles I'll see if I can't find a work around. It used to work great and I am in the middle of a major refactor on my project so I was surprised when the important started failing.
On Fri, Sep 6, 2024, 14:43 Nathan Larsen @.***> wrote:
Hmm, pydantic shouldn't need to know where Client is, because Client isn't a model. I think the fix is to stop pydantic from trying to evaluate the annotations of private attributes.
However to be frankly honest with you, I'm taking a lot of classes this semester, and don't have the bandwidth to fix this immediately.
I might be able to get to it by next Saturday, or sometime before then.
— Reply to this email directly, view it on GitHub https://github.com/GrandMoff100/HomeAssistantAPI/issues/188#issuecomment-2334625656, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA3TULCMNIBE34CS3CL7RDZVHZW3AVCNFSM6AAAAABNY7IX5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZUGYZDKNRVGY . You are receiving this because you authored the thread.Message ID: @.***>
I'm going to +1 this issue, as I'm having the same problem. Also not critical for me, so I think I'll try an older version in the mean time. ETA: yeah, older version doesn't work due to issue:151
Guess I'll back burner this project for now then.
+1 on RPIOS bullseye with python 3.9.2. No problem on macOS 14.6.1 with python 3.9.18.
I have a same error -.-;; OS: mac M1 Pro (Sonoma 14.6.1) python : 3.12.5 HomeAssistant-API: 4.2.2.post1
Just some clues. Looks like pydantic introduced some chance in the v2.9.x series that has upset this library. The dependencies in this project allows any version >=2.0 so it's obviously tripped up by an upstream change. I haven't dug through the change logs to figure out what that is.
Falling back to the previous minor version using pip install pydantic==2.8.2
worked for me. This version should probably be pinned or the change dealt with.
Can confirm.
Pinning pydantic==2.8.2
works for me as well.
mac 14.6.1 on arm64 Python 3.12.5 HomeAssistant-API: 4.2.2.post1
Describe the bug attempting to import home assistant returns the following trace back..
`Python 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.
To Reproduce Steps to reproduce the behavior:
Download latest code from github or install from pip3 on raspberry pi OS bookworm. In my case I am using a pi5 but i tested and it also happens on bookworm on a pi4. Both codebases have the issue
Attempt to import home assistant api client in python3.11.2 from homeassistant_api import Client
Receive Traceback
Expected behavior A clean import of the object to use
Desktop (please complete the following information):