Dear Pickaxe.co Support Team,
I hope you’re well. I’m writing from the Acadêmico 24h studio regarding persistent failures in my Escrita Acadêmica Action (ID EQUIPEID). Below is a detailed account of every issue encountered during this session—and the steps already taken to address them—so that you can help identify what may still be going wrong.
1. Pillow (PIL
) Import Failures
-
Error Messages:
ModuleNotFoundError: No module named 'PIL'
AttributeError: module 'PIL' has no attribute 'Image'
-
Context: Occurs immediately after uploading any PDF or image, before any OCR or image conversion runs.
-
What I’ve Tried:
-
Added Pillow under Additional packages in the Action settings.
-
Implemented dynamic import logic:
try:
PIL = importlib.import_module("PIL") Image = PIL.Image except ImportError: subprocess.run([sys.executable, "-m", "pip", "install", "Pillow"]) PIL = importlib.import_module("PIL") Image = PIL.Image
-
Redeployed and restarted the Action multiple times.
-
Despite confirming “installation succeeded” in the logs, the module remains unreachable at execution time.
2. Dynamic Dependencies for Other Libraries
Each of the following modules also uses the same dynamic-import pattern, and none have been accessible despite successful “install” logs:
Module | Package Name | Import Pattern |
---|---|---|
python-docx | python-docx |
docx = importlib.import_module("docx") |
PyMuPDF (fitz) | PyMuPDF |
fitz = importlib.import_module("fitz") |
pandas | pandas |
pd = importlib.import_module("pandas") |
tabulate | tabulate |
tabulate = importlib.import_module("tabulate") |
pytesseract | pytesseract |
same pattern |
textract | textract |
same pattern |
whisper | whisper |
same pattern |
moviepy.editor | moviepy |
import moviepy.editor |
beautifulsoup4 | beautifulsoup4 |
import bs4 |
python-pptx | python-pptx |
import pptx |
openai | openai |
import openai |
All above modules report “installation successful” yet still raise ImportError
at runtime.
3. Other Errors Encountered
Whenever the Action attempts to embed base64-encoded images into the chat (for OCR previews), I sometimes see:
Image build for im-<ID> failed with the exception: <exception message>
I’ve not been able to capture a full stack trace of that particular failure, but it correlates with any call to:
data_uri = f"data:{mime};base64,{b64}"
and subsequent insertion into the messages list.
4. Steps Already Taken
-
Additional Packages: Listed every dependency under Additional packages.
-
Dynamic Imports: Consolidated all imports under a uniform
importlib
-based helper. -
Redeployment: Re-saved and restarted the Action after each change.
-
Environment Check: Confirmed that no external “system” or virtual-environment setup is possible—everything must happen in-code.
5. Requested Assistance
-
Verify Runtime Behavior: Does the Pickaxe.co sandbox truly install and expose newly added packages at runtime?
-
Correct Package Names/Versions: Are there specific version constraints (e.g.
Pillow==9.0.0
,moviepy==2.0.0
) required? -
Sandbox/Caching Issues: Could a caching layer or sandbox isolation prevent freshly installed modules from being loaded?
-
Image-Embedding Failures: What are the correct limits or formats for base64-image messages to avoid “Image build… failed” errors?
Thank you for your time and support. Please let me know if you need any further logs, screenshots, or code snippets.
Best regards,
Marcos Andrade
Escrita Acadêmica Assistant
Acadêmico 24h Studio
Action ID: EQUIPEID