PermissionError: [Errno 13] Permission denied when I am trying to deploy!

Hi all,
I am new to Streamlit and trying to deploy my application via Github.
I am facing this problem:

PermissionError: [Errno 13] Permission denied: โ€˜/home/adminuser/venv/lib/python3.9/site-packages/pix2tex/model/checkpoints/weights.pthโ€™

Note: Pix2tex is a Python lib for recognizing math formulas and weights.pth will be downloaded automatically on the first use.

Here is my repo: repo
Thanks for reading!! I hope you can help me :<

Hi @Anh_Nam,

Thanks for posting!

Your app wonโ€™t have directory red/write access once you deploy it to Streamlit Community Cloud and thatโ€™s why youโ€™re getting the permission error.

One solution for you would be to pre-download the weights.pth file and include it in your repository then adjust the pix2tex settings to point to this file instead of trying to download it on the first run.

Let me know if this helps.

1 Like