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: can't use CameraCaptureUI #759

Closed
oxygen-dioxide opened this issue Sep 22, 2021 · 2 comments
Closed

Python: can't use CameraCaptureUI #759

oxygen-dioxide opened this issue Sep 22, 2021 · 2 comments

Comments

@oxygen-dioxide
Copy link

>>> from winrt.windows.media.capture import CameraCaptureUI
>>> cap=CameraCaptureUI()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: 不支持从 MTA 中激活单线程类

windows 22454

@dlech
Copy link
Contributor

dlech commented Sep 22, 2021

This is due to the fact that the library currently initializes itself as a multi-threaded apartment (MTA). Programs with a graphical user interface need to have a single-threaded apartment (STA). See discussion in #690.

@github-actions
Copy link

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants