omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    AssertionError: Cannot show camera from main UI thread

    Pythonista
    2
    3
    1583
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Webmaster4o
      Webmaster4o last edited by

      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 do photos.capture_image() on the next line, it works, I only get this error when it is button-triggered.

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by

        Try to see if the @ui.in_background decorator helps in this situation.

        1 Reply Last reply Reply Quote 0
        • Webmaster4o
          Webmaster4o last edited by

          Thanks a ton.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors