https://promptfoo.dev/ logo
Does anyone else has a Python provider problem
# ❓|questions
m
I'm using promptfoo version: 0.119.6. In my yaml I have configured provider like that: providers: - id: 'file://retrieve_answer.py' I get an error:
Copy code
[logger.js:324] Python worker stderr: ERROR handling call: [Errno 2] No such file or directory: 'C'
Traceback (most recent call last):
  File "C:\Users\x\AppData\Roaming\npm\node_modules\promptfoo\dist\src\python\persistent_wrapper.py", line 191, in handle_call
    with open(request_file, "r", encoding="utf-8") as f:
         ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C'


[logger.js:324] Python worker stderr: ERROR: Failed to write error response: [Errno 22] Invalid argument: '\\Users\\x\\AppData\\Local\\Temp\\promptfoo-worker-req-1763023104223-7f0714e90c0d6.json:C:\\Users\\x\\AppData\\Local\\Temp\\promptfoo-worker-resp-1763023104223-8d908bcfbd3be.json'                                                                                                                                                              

[logger.js:324] Shutdown complete
[logger.js:324] Failed to read response file after 16 attempts (~18s). Expected: promptfoo-worker-resp-1763023104223-8d908bcfbd3be.json, Found in C:\Users\x\AppData\Local\Temp: promptfoo-worker-req-1762959388946-f0ac9b4f1dd7e.json, promptfoo-worker-req-1762959433064-8d405bf3e7d72.json, promptfoo-worker-req-1763023104223-7f0714e90c0d6.json
I didn't have this problem some time ago, so I think it started after the update to Promptfoo.
m
Hi @Monini I will look into this for you
I broke this as part of https://github.com/promptfoo/promptfoo/pull/5968 (making Python more efficient) and I'm sorry. This PR will fix it and will be in the next release: https://github.com/promptfoo/promptfoo/pull/6262 Feel free to reach out to michael@promptfoo.dev or DM me if you'd like some apology promptfoo swag.
2 Views