Encountering an fc-list error while deploying on community cloud

FileNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).


File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)File "/app/pdfmaker/main.py", line 10, in <module>
    ImageFormatter()File "/home/appuser/venv/lib/python3.9/site-packages/pygments/formatters/img.py", line 376, in __init__
    self.fonts = FontManager(options.get('font_name', ''), fontsize)File "/home/appuser/venv/lib/python3.9/site-packages/pygments/formatters/img.py", line 82, in __init__
    self._create_nix()File "/home/appuser/venv/lib/python3.9/site-packages/pygments/formatters/img.py", line 100, in _create_nix
    path = self._get_nix_font_path(self.font_name, name)File "/home/appuser/venv/lib/python3.9/site-packages/pygments/formatters/img.py", line 85, in _get_nix_font_path
    proc = subprocess.Popen(['fc-list', "%s:style=%s" % (name, style), 'file'],File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filena

I get this error when my app is deployed on the community cloud. It works fine locally. Any solutions?

The error message should give more information, check the web console.

I suspect that either the clit-tool fc-list is not available or a font was not found.

Ya fc-list was not available because I did not have the fontconfig package. I just created a packages.txt file and added fontconfig to it. Solved the issue in no time! Thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.