Hello,
I'm currently deploying a Custom Function on the OVH Data Platform, and I'm encountering issues when trying to run my Python script in that environment.
What my script does
This script performs an automated evaluation of PDF files using OpenAI's GPT-4o model. The steps include:
-
Loading PDFs from a mounted bucket (via the environment variable
BUCKET_PATH) -
Extracting text from the PDFs using
PyMuPDF -
Converting pages to images using
pdf2image -
Creating prompts (text + image) from templates stored in other files (via
PROMPT_TEXTE_PATHandPROMPT_VISION_PATH) -
Sending requests to OpenAI using the
openaiPython SDK -
Extracting numeric scores from the model's response
-
Saving the results in
.xlsxand.txtformat to a result bucket (OUTPUT_PATH)
Problem
The exact same code works perfectly when run locally in Python 3.11.
However, when I deploy it as a Custom Function on the OVH Data Platform, it fails — even though all variables and dependencies are correctly configured, and I’m not using the event object for input.
Logs
You can find a detailed log of the failure here:
Can you please help me understand why this same script fails inside the platform even though it runs locally with no issues?
Thanks a lot for your support,
Best regards,
Hello@piv
If the malfunction persists, I invite you to add details and tests performed since the creation of your post.
If not, please feel free to share the solution you've found so that as many people as possible can benefit from it.
^FabL