Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Browser or Proxy error when trying Python Worker

Tagged: ,

  • Browser or Proxy error when trying Python Worker

    Posted by Nathanaël on August 17, 2023 at 3:12 pm

    Windows 11 + O$ 11 Build 110035439 64 bit + Python 3.11.4

    I made a simple desktop lib to test the new Python worker, using the pyworker/omnis_test provided module. Python is installed and working (with pure Python tests). I did install the Omnis Python requirements ([my profile]\AppData\Local\Omnis Software\OS 11\pyworker>pip install -r requirements.txt)

    The worker starts with no error, but after calling the test method (Do $cinst.$callmethod(‘omnis_test’,’test’)), the call back is always an error (code 10811) :

    A problem occurred when trying to call the method : 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

    Any idea why and what I could look at?

    Nathanaël replied 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Götz Krija

    Member
    August 18, 2023 at 9:27 am

    Hello Nathanaël,

    Did you test the demo library in the Omnis Studio HUB > Samples > Python Worker

    The library works fine for me on Windows 11:

    1. Installed Python 3.11.4 (in the installer checked the box ‘Add python.exe to PATH’)

    2. In command line executed: pip install -r “C:\Users\[USER]\AppData\Local\OS 11 35439 x64\pyworker\requirements.txt”

    3. Tested the Python Worker sample in HUB and the result was successfully returned in the $pyWorkerComplete method

    Götz

  • Nathanaël

    Member
    August 18, 2023 at 10:10 am

    Hi @Götz Krija

    Thanks for your answer.

    In between, I found out about the new sample library and it’s working very well on my setup indeed.

    Not sure what caused the original error in my previous test/own library (except that I used an object instead of an object reference for the pyWorker), but at least now I can copy the logic and good practices of the sample library.

Log in to reply.