I did a Python function to generate a thumbnail of a PDF page.
It runs fine when I test the function (pass the pdf as a base64). Finds the module.
When I invoke it in code block, it doesn't find the module.
javascript and python are actually ran in a separate sandboxed env for security. if i remember right, workflows are similar but are ran on a completely different server (i just tried searching the docs to find where this is mentioned and failed, i'll update this if i stumble upon it again)
Similar to @bobthebear's point, running individual blocks can sometimes differ from running the full workflow. It's not a complete fix, but I was at least able to get this library working when running the full workflow