Issue with pymupdf on SCC

Hello everyone, I’ve got an issue with a cloud deployment which uses PyMuPDF and Fitz to convert PDFs to an image. I am currently using Streamlit 1.28 and Python 3.9. My requirements file contains:

(custom packages)

My packages.txt contains:

When I run the application locally, I have no issues, but the same deployment on cloud breaks for the below error:

    import fitz
File "/home/adminuser/venv/lib/python3.9/site-packages/fitz/", line 1, in <module>
    from frontend import *
File "/home/adminuser/venv/lib/python3.9/site-packages/frontend/", line 1, in <module>
    from .events import *
File "/home/adminuser/venv/lib/python3.9/site-packages/frontend/events/", line 1, in <module>
    from .clipboard import *
File "/home/adminuser/venv/lib/python3.9/site-packages/frontend/events/", line 2, in <module>
    from ..dom import Event
File "/home/adminuser/venv/lib/python3.9/site-packages/frontend/", line 439, in <module>
    from . import dispatcher
File "/home/adminuser/venv/lib/python3.9/site-packages/frontend/", line 15, in <module>
    from . import config, server
File "/home/adminuser/venv/lib/python3.9/site-packages/frontend/", line 24, in <module>
    app.mount(config.STATIC_ROUTE, StaticFiles(directory=config.STATIC_DIRECTORY), name=config.STATIC_NAME)
File "/home/adminuser/venv/lib/python3.9/site-packages/starlette/", line 57, in __init__
    raise RuntimeError(f"Directory '{directory}' does not exist")

Is this an issue with any particular version(s) that I might need to address to be compatible with community cloud? The app is currently private while in development.

I set up a repository according to your description and deployed id in Streamlit Cloud. import fitz was executed without issues.

Try rebooting or redeploying your app. If that doesn’t work, there must be something relevant that you didn’t tell us.