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

Python 3.11 #1

Closed
AiyionPrime opened this issue Jun 29, 2023 · 11 comments
Closed

Python 3.11 #1

AiyionPrime opened this issue Jun 29, 2023 · 11 comments

Comments

@AiyionPrime
Copy link

Hey there, I'd like to use you projects but am currently struggling building it on my python 3.11 running machine.

I hope I did not miss anything, but I installed python 3.10 in parallel, setup a venv running on 3.10 accordingly, installed pyinstaller in there and ran the steps from the Makefile in that order.

The application does work? when I then install the built wheel in the venv and run agua_amiga.
At least the UI does.

Whether the bluetooth part works, I cannot tell yet, as it does not find my bottle.
Before I start debugging that, are there any technical reasons, why this project is limited to 3.10 and not 3.11?
I'd really like to use the system python instead of the venv.

@mpnordland
Copy link
Owner

Uh, well, none that I remember. That may have been setup by poetry. I'll try and see if it works on 3.11 now.

@mpnordland
Copy link
Owner

So looks like that was due to how pyinstaller specifies its dependencies. I've updated them but it's not currently working on my own system rn but I suspect that may be for other reasons. I'll dig into this further after work this evening.

@mpnordland
Copy link
Owner

I pushed my changes so far in case you find that helpful.

@AiyionPrime
Copy link
Author

That was fast, thanks :D
I'm just digging into trouble-shooting my bottle.
It's a hidratespark pro, and as far as I can tell (just getting started with gatttool) at least the sip-uuid is still present; so maybe this tool works just fine, after I got past setting the bottle up initially.

@mpnordland
Copy link
Owner

mpnordland commented Jun 29, 2023

Yeah I had no other bottles to test with so I have no idea if it will work. I gathered most of my knowledge on how the protocol works from https://github.com/choonkiatlee/wban-python/blob/master/Hidrate.py#L152 which is sparse on details as well. A really great way to explore your device is with d-feet and the BlueZ dbus service. Bonus thing is that this is also how agua amiga talks to bluetooth devices so you see the same things it sees.

@mpnordland
Copy link
Owner

Hmm agua amiga uses python-dbus-next and there's an error that happens on Python 3.11 in that library. A fix was merged but a new release is not forth coming. I'm going to try building/running it from git to see if that fixes the segfault. I'm pretty sure it's in that library because I've tracked the failure to the line that connects to DBus.

@AiyionPrime
Copy link
Author

Not sure if that helps, but this is an strace for the latest commit.
https://aiyionpri.me/shared/agua_amiga/ea9af4d1.strace

@AiyionPrime
Copy link
Author

You mean altdesktop/python-dbus-next#138, right?

@mpnordland
Copy link
Owner

Yeah that's the one. Using master branch from that git repo fixes the segfault on my end so I've pushed updates to the dependencies.

@AiyionPrime
Copy link
Author

Confirmed; the latest commit builds without problems.

@mpnordland
Copy link
Owner

Sweet! I'll close this issue then but feel free to open another if you run into more problems.

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

2 participants