Yizhe
Yizhe
WWindmill
Created by Yizhe on 11/14/2024 in #help
Python import randomly fails
Here's my script:
# requirements:
# psd_tools

from psd_tools import PSDImage

def main():
return None
# requirements:
# psd_tools

from psd_tools import PSDImage

def main():
return None
When I execute it, about 60% of the time it fails with the following error messages:
ExecutionErr: ExitCode: 1, last log lines:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/tmp/windmill/wk-default-f609a61209f6-TbLO9/01932967-f3dc-c0f3-6009-2402dacd47c8/wrapper.py", line 10, in <module>
from u.sunyizhe import tougher_script as inner_script
File "/tmp/windmill/wk-default-f609a61209f6-TbLO9/01932967-f3dc-c0f3-6009-2402dacd47c8/u/sunyizhe/tougher_script.py", line 4, in <module>
from psd_tools import PSDImage
ImportError: cannot import name 'PSDImage' from 'psd_tools' (unknown location)
ExecutionErr: ExitCode: 1, last log lines:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/tmp/windmill/wk-default-f609a61209f6-TbLO9/01932967-f3dc-c0f3-6009-2402dacd47c8/wrapper.py", line 10, in <module>
from u.sunyizhe import tougher_script as inner_script
File "/tmp/windmill/wk-default-f609a61209f6-TbLO9/01932967-f3dc-c0f3-6009-2402dacd47c8/u/sunyizhe/tougher_script.py", line 4, in <module>
from psd_tools import PSDImage
ImportError: cannot import name 'PSDImage' from 'psd_tools' (unknown location)
Tweaking #requirement psd_tools doesn't help. Other dependencies don't work as well. I cannot reproduce it reliably.
8 replies
WWindmill
Created by Yizhe on 11/14/2024 in #help
How to trigger a user-specific webhook when a job completes?
I'm triggering my scripts via API, and I have a webhook provided by another service where I want to send the result of my scripts. Is there a way to accomplish that without sending an HTTP request myself? Alternatively, is there a way to "subscribe" to a job so that I get notified when it completes without repeatedly polling its status?
2 replies