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

No way to use library with unifi controller #39

Open
Kolia56 opened this issue Nov 21, 2023 · 3 comments
Open

No way to use library with unifi controller #39

Kolia56 opened this issue Nov 21, 2023 · 3 comments

Comments

@Kolia56
Copy link

Kolia56 commented Nov 21, 2023

Hello,
I'm running Unifi Controller 7.2.97-18705-1 on a CloudKey (firmware v1.1.19). Self signed certificate
This program run on a Windows 10 machine with Python 3.12.0

from unificontrol import UnifiClient
client = UnifiClient(host='xxx.xxx.xxx.xxx', username='xxx', password='yyyyyy')

triggers the following exception

Exception ignored in: <function PinningHTTPSAdapter.__del__ at 0x000001DB23C41580>
Traceback (most recent call last):
  File "C:\Users\NicolasRabaté\AppData\Roaming\Python\Python312\site-packages\unificontrol\pinned_requests.py", line 85, in __del__
  File "C:\Program Files\Python312\Lib\tempfile.py", line 478, in __getattr__
AttributeError: '_io.TextIOWrapper' object has no attribute 'delete'

What could be the reason? Thank you

@nickovs
Copy link
Owner

nickovs commented Nov 22, 2023

It appears that there was some change to the deletion semantics on Windows in Python 3.12. I don't have a Windows machine on which to try things, but I will take a look and see if I can work out what is going on.

@Kolia56
Copy link
Author

Kolia56 commented Nov 22, 2023

It appears that there was some change to the deletion semantics on Windows in Python 3.12. I don't have a Windows machine on which to try things, but I will take a look and see if I can work out what is going on.

Thank you very much to take care of this issue. Let me know if I can be of any help on this matter for further testing, for instance.

MauritzFunke pushed a commit to MauritzFunke/unificontrol that referenced this issue Jun 26, 2024
@Vasilich
Copy link

any chance to look at it?
I use it on HomeAssistantOS (Linux based), so no Windows involved, but I get the same exception message as topicstarter,

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

3 participants