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

RuntimeError: no running event loop #43

Open
sponz opened this issue Dec 23, 2024 · 1 comment
Open

RuntimeError: no running event loop #43

sponz opened this issue Dec 23, 2024 · 1 comment

Comments

@sponz
Copy link

sponz commented Dec 23, 2024

Hi,

I am trying to run it on a Linux Mint 21.2, running on an old imac, and I get the following error message:

scratch_link -d
Print debug messages
2024-12-23 22:02:53,011 set scan_seconds: 10.0
2024-12-23 22:02:53,011 set scan_retry: 1
2024-12-23 22:02:53,033 Certificate is ready in FireFox NSS DB: /home/admin1/.mozilla/firefox/5srxf0yb.default-release
2024-12-23 22:02:53,058 Certificate is ready in Chrome NSS DB: /home/admin1/.pki/nssdb
Traceback (most recent call last):
  File "/home/admin1/.local/bin/scratch_link", line 8, in <module>
    sys.exit(main())
  File "/home/admin1/.local/lib/python3.10/site-packages/pyscrlink/scratch_link.py", line 576, in main
    start_server = websockets.serve(
  File "/home/admin1/.local/lib/python3.10/site-packages/websockets/asyncio/server.py", line 737, in __init__
    self.server = Server(
  File "/home/admin1/.local/lib/python3.10/site-packages/websockets/asyncio/server.py", line 281, in __init__
    self.loop = asyncio.get_running_loop()
RuntimeError: no running event loop

I have followed the instructions, but I am stuck.

Any help? Kids want to use their legos during Christmas.

Thanks in advance

@Olzaq
Copy link

Olzaq commented Dec 26, 2024

Hi
Try this fork: pyscrlink which has updated websocket. They should make pull request back here...

In case its helpful here are the steps I did to use it inside python virtual environment: venv

Create:
python3 -m venv pySrcLinkEnv

Source it:
source pySrcLinkEnv/bin/activate

Install suggested package for dependencies (Maybe also works without?)
pip3 install pyscrlink

Set capabilites (as root, and make sure to exit from root console)

# cd to-users-working-dir
source pySrcLinkEnv/bin/activate
bluepy_helper_cap
exit

Remove installed pyscrlink
pip3 uninstall pyscrlink

Install build
pip3 install build

Build the package (at the working folder where release script is located)
./release.sh build

Install it
pip3 install dist/pyscrlink-0.2.8.tar.gz

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