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

Windows 11: Bleak discover has an exception: Unhandled Exception: System.NotSupportedException: Cannot create uninitialized instances of types requiring managed activation. #32

Open
AshleyPinner opened this issue Feb 21, 2023 · 0 comments

Comments

@AshleyPinner
Copy link

Hello!

After installing python on Windows 11 and then bricknil, and then patching stuff so it'd actually run (and not error about imports)< I can't seem to get any of the example code working:

> python train-control.py
started thread for curio
DEBUG:asyncio:Using proactor: IocpProactor
inside curio run loop
INFO:BLE Event Q.0:using bleak
DEBUG:train1.2:Decorating class Train with TrainMotor
INFO:BLE Event Q.0:Starting scan for UART 00001623-1212-efde-1623-785feabcd123
INFO:BLE Event Q.0:Looking for first matching hub
Awaiting on bleak discover

Unhandled Exception: System.NotSupportedException: Cannot create uninitialized instances of types requiring managed activation.
   at System.Runtime.Serialization.FormatterServices.nativeGetUninitializedObject(RuntimeType type)
   at Python.Runtime.ClassObject.tp_new_impl(BorrowedReference tp, BorrowedReference args, BorrowedReference kw)
   at Python.Runtime.NativeCall.Call_3(IntPtr fp, BorrowedReference a1, BorrowedReference a2, BorrowedReference a3)
   at Python.Runtime.MetaType.tp_call(BorrowedReference tp, BorrowedReference args, BorrowedReference kw)

I get this error even if I try running the python code in an elevated cmd instance.

I'm not sure how to progress; it seems like some .net error, but none of the google hits indicate what the issue is or how to resolve it.

Any thoughts?

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