AssertionError: Cannot show camera from main UI thread
-
I'm getting this running my script. I think it has something to do with
photos.capture_image
triggered by a UI button. How do I get around this?Note: If I do
ui.load_ui().present()
and then dophotos.capture_image()
on the next line, it works, I only get this error when it is button-triggered.
-
Try to see if the
@ui.in_background
decorator helps in this situation.
-
Thanks a ton.