YizheY
Windmill14mo ago
7 replies
Yizhe

Python import randomly fails

Here's my script:

# 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)


Tweaking #requirement psd_tools doesn't help. Other dependencies don't work as well. I cannot reproduce it reliably.
Was this page helpful?