Open jaherron opened 1 month ago
ModuleNotFoundError: No module named 'imp'
Is likely because you are on python 3.12. Downgrade to 3.11 or clone repo instead of using pip.
ModuleNotFoundError: No module named 'imp'
Is likely because you are on python 3.12. Downgrade to 3.11 or clone repo instead of using pip.
i'm new to this and google isn't really helping me here, what's the command to downgrade to 3.11 ? i've been looking for it for days and i can't find it...
Depends, what's your linux distro? Probably easiest way is to just continue to use python 3.12, but clone the repo to use it instead of installing from pypi
Depends, what's your linux distro? Probably easiest way is to just continue to use python 3.12, but clone the repo to use it instead of installing from pypi
I'm on linux mint, i cloned the repo and now idk what to do with it
Well, start with running the demo:
python3 demo.py
Looks like the general entrypoint is cli.py
in the nxbt folder so you could also try
python3 nxbt/cli.py demo
I did author PR #162 to update the dependencies that were causing the issue, and I tested and confirmed that the software still worked. I just don't know if any maintainers saw it yet.
Well, start with running the demo:
python3 demo.py
Looks like the general entrypoint is
cli.py
in the nxbt folder so you could also trypython3 nxbt/cli.py demo
i'm getting this error :
Traceback (most recent call last):
File "/home/raziiel/nxbt/demo.py", line 63, in <module>
nx = nxbt.Nxbt()
^^^^^^^^^^^
File "/home/raziiel/nxbt/nxbt/nxbt.py", line 181, in __init__
toggle_clean_bluez(True)
File "/home/raziiel/nxbt/nxbt/bluez.py", line 131, in toggle_clean_bluez
override_dir.mkdir(parents=True, exist_ok=True)
File "/usr/lib/python3.12/pathlib.py", line 1313, in mkdir
os.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/run/systemd/system/bluetooth.service.d'
same with python3 nxbt/cli.py demo
Try running with sudo
. Also, you may just want to take some time to learn python and linux in general, it will help you greatly in troubleshooting these types of issues.
I did author PR #162 to update the dependencies that were causing the issue, and I tested and confirmed that the software still worked. I just don't know if any maintainers saw it yet.
Nice, yeah I wonder if this project is somewhat dead-ish.
it doesn't seem to do anything?
UPDATE : it worked i had to restart my switch for some reason, now the only problem i have is cli.py not working
I got it to work by creating a file in the repo root called test.py
containing:
import nxbt
RETURN_TO_GAME_MACRO = """
6s
A 0.1s
1s
B 0.1s
1s
B 0.1s
1s
HOME 0.1s
1s
"""
# Start the NXBT service
nx = nxbt.Nxbt()
# Create a Pro Controller and wait for it to connect
print("Connecting... ensure you are on 'Change Grip/Order' screen")
controller_index = nx.create_controller(nxbt.PRO_CONTROLLER)
nx.wait_for_connection(controller_index)
print("Connected!")
print("Running macro to return to game...")
nx.macro(controller_index, RETURN_TO_GAME_MACRO)
And then I ran sudo python3 test.py
You might also have luck making the change @jaherron made in his PR here: https://github.com/Brikwerk/nxbt/pull/162/files and then doing pip install -e .
got this
update : removed some lines and ig it worked..?
update again : after everything, it doesn't seem to work? i'm kinda lost on what to do now
Device: Raspberry Pi 5 (8GB RAM) OS: Ubuntu 24.04.1 Python Version: 3.12.3 pipx version: 1.4.3
I got the externally-managed error when installing nxbt, so I tried using pipx as instructed by pip. It's throwing an error about a missing module called "imp".
Output from pipx (verbose)