Skip to main content
Question

Error PIL

  • November 10, 2025
  • 2 replies
  • 13 views

Forum|alt.badge.img

a script for resizing an image seems to run correctly, but sometimes, i get the error “

Error No module named 'PIL'”.. the script doses  include the command however “   from PIL import Image”

do i have to add some declarations before ? 

2 replies

AndrewJDavison
Forum|alt.badge.img+11
  • Zapier Solution Partner
  • November 10, 2025

Is this a Python code step you’ve setup? If so can you screenshot the code.

The code step doesn’t allow the import of libraries so that might be it.


Sparsh from Automation Jinn
Forum|alt.badge.img+6

Hey ​@pamillet,

Not all libraries are supported in Code by Zapier action. 

Here is a helpful article about it here- https://help.zapier.com/hc/en-us/articles/8496326417549-Use-Python-code-in-Zaps

Referencing the limitation from the article-

  • Code steps include the standard library, the requests packages, and the BeautifulSoup library. You cannot install additional libraries or pip modules directly.

The easier workaround will be use an app as a workaround for the resizing. Here are all the image apps in Zapier- https://zapier.com/apps/categories/images. Hope it helps!