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

CLI version throws error 'Event loop is closed' #18

Open
quistuipater opened this issue Oct 24, 2024 · 0 comments
Open

CLI version throws error 'Event loop is closed' #18

quistuipater opened this issue Oct 24, 2024 · 0 comments

Comments

@quistuipater
Copy link

quistuipater commented Oct 24, 2024

I'm trying to get NiimPrintX running on macOS Big Sur v11.7.10 on an iMac (Retina, 5K, 27-inch, Late 2014) with a B21 but it crashes. Here's the verbose mode output:

mgibbs@redqueen NiimPrintX % python -m pdb -m NiimPrintX.cli -v info -m b21

/Users/mgibbs/Documents/GitHub/NiimPrintX/NiimPrintX/cli/main.py(1)()
-> from NiimPrintX.cli.command import niimbot_cli
(Pdb) c
2024-10-24T12:34:42.088818-0700 | INFO | Niimbot Information
Niimbot Information
Cannot find bluetooth characteristics.
The program exited via sys.exit(). Exit status: 0
/Users/mgibbs/Documents/GitHub/NiimPrintX/NiimPrintX/cli/main.py(1)()
-> from NiimPrintX.cli.command import niimbot_cli
(Pdb) 2024-10-24 12:34:50.121 Python[88706:32058250] PyObjC: Converting exception to Objective-C:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 366, in centralManager_didDisconnectPeripheral_error_
self.event_loop.call_soon_threadsafe(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 806, in call_soon_threadsafe
self._check_closed()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
2024-10-24 12:34:50.166 Python[88706:32058250] *** Terminating app due to uncaught exception 'OC_PythonException', reason: '<class 'RuntimeError'>: Event loop is closed'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff20500bdb __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20239d92 objc_exception_throw + 48
2 _objc.cpython-311-darwin.so 0x000000010b6abd82 PyObjCErr_ToObjCWithGILState + 114
3 _objc.cpython-311-darwin.so 0x000000010b679561 method_stub + 12417
4 libffi.dylib 0x00007fff2d9764d4 ffi_closure_unix64_inner + 502
5 libffi.dylib 0x00007fff2d976a8c ffi_closure_unix64 + 72
6 CoreBluetooth 0x00007fff3091e048 -[CBCentralManager handleMsg:args:] + 811
7 CoreBluetooth 0x00007fff30910037 -[CBManager xpcConnectionDidReceiveMsg:args:] + 177
8 CoreBluetooth 0x00007fff3090ff73 __30-[CBXpcConnection _handleMsg:]_block_invoke + 66
9 libdispatch.dylib 0x00007fff201e3623 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x00007fff201e4806 _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff201ea5ea _dispatch_lane_serial_drain + 606
12 libdispatch.dylib 0x00007fff201eb0e0 _dispatch_lane_invoke + 417
13 libdispatch.dylib 0x00007fff201ea493 _dispatch_lane_serial_drain + 263
14 libdispatch.dylib 0x00007fff201eb0ad _dispatch_lane_invoke + 366
15 libdispatch.dylib 0x00007fff201f4c0d _dispatch_workloop_worker_thread + 811
16 libsystem_pthread.dylib 0x00007fff2038b45d _pthread_wqthread + 314
17 libsystem_pthread.dylib 0x00007fff2038a42f start_wqthread + 15
)
libc++abi: terminating with uncaught exception of type NSException
zsh: abort python3 -m pdb -m NiimPrintX.cli -v info -m b21
mgibbs@redqueen NiimPrintX %

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

1 participant