App deoployment possible locally, but not on render. ModuleNotFoundError: No module named 'markupsafe'

So I’ve written a streamlit application that fetches data from Big Query and returns downloadable Json files for the user. It works great when I run my app locally but when trying to deploy the app on Render I get the error:

ModuleNotFoundError: No module named ‘markupsafe’

Which i find quite remarkable since I’ve included this in my requirements.txt file. This error seems to happen during installation of markupsafe:


Aug 22 01:17:43 PM  Collecting MarkupSafe==2.1.3 (from -r requirements.txt (line 4))
Aug 22 01:17:43 PM    Downloading https://files.pythonhosted.org/packages/6d/7c/59a3248f411813f8ccba92a55feaac4bf360d29e2ff05ee7d8e1ef2d7dbf/MarkupSafe-2.1.3.tar.gz
Aug 22 01:17:43 PM      Complete output from command python setup.py egg_info:
Aug 22 01:17:43 PM      Traceback (most recent call last):
Aug 22 01:17:43 PM        File "<string>", line 1, in <module>
Aug 22 01:17:43 PM        File "/tmp/pip-install-bk1u3pwn/MarkupSafe/setup.py", line 65, in <module>
Aug 22 01:17:43 PM          run_setup(True)
Aug 22 01:17:43 PM        File "/tmp/pip-install-bk1u3pwn/MarkupSafe/setup.py", line 44, in run_setup
Aug 22 01:17:43 PM          ext_modules=ext_modules if with_binary else [],
Aug 22 01:17:43 PM        File "/opt/render/project/src/.venv/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
Aug 22 01:17:43 PM          return distutils.core.setup(**attrs)
Aug 22 01:17:43 PM        File "/opt/render/project/python/Python-3.7.0/lib/python3.7/distutils/core.py", line 121, in setup
Aug 22 01:17:43 PM          dist.parse_config_files()
Aug 22 01:17:43 PM        File "/opt/render/project/src/.venv/lib/python3.7/site-packages/setuptools/dist.py", line 494, in parse_config_files
Aug 22 01:17:43 PM          ignore_option_errors=ignore_option_errors)
Aug 22 01:17:43 PM        File "/opt/render/project/src/.venv/lib/python3.7/site-packages/setuptools/config.py", line 106, in parse_configuration
Aug 22 01:17:43 PM          meta.parse()
Aug 22 01:17:43 PM        File "/opt/render/project/src/.venv/lib/python3.7/site-packages/setuptools/config.py", line 382, in parse
Aug 22 01:17:43 PM          section_parser_method(section_options)
Aug 22 01:17:43 PM        File "/opt/render/project/src/.venv/lib/python3.7/site-packages/setuptools/config.py", line 355, in parse_section
Aug 22 01:17:43 PM          self[name] = value
Aug 22 01:17:43 PM        File "/opt/render/project/src/.venv/lib/python3.7/site-packages/setuptools/config.py", line 173, in __setitem__
Aug 22 01:17:43 PM          value = parser(value)
Aug 22 01:17:43 PM        File "/opt/render/project/src/.venv/lib/python3.7/site-packages/setuptools/config.py", line 430, in _parse_version
Aug 22 01:17:43 PM          version = self._parse_attr(value)
Aug 22 01:17:43 PM        File "/opt/render/project/src/.venv/lib/python3.7/site-packages/setuptools/config.py", line 305, in _parse_attr
Aug 22 01:17:43 PM          module = import_module(module_name)
Aug 22 01:17:43 PM        File "/opt/render/project/python/Python-3.7.0/lib/python3.7/importlib/__init__.py", line 127, in import_module
Aug 22 01:17:43 PM          return _bootstrap._gcd_import(name[level:], package, level)
Aug 22 01:17:43 PM        File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
Aug 22 01:17:43 PM        File "<frozen importlib._bootstrap>", line 983, in _find_and_load
Aug 22 01:17:43 PM        File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
Aug 22 01:17:43 PM      ModuleNotFoundError: No module named 'markupsafe'

I appreciate any support and let me know if you also need any more information. Thanks!

Hi,

I’ve replied to the ticket you also opened. Let’s keep the conversation in one place (on the ticket). Then you can update this post when we get to the solution.

Alan

Hello Alan,

After about 1 hour of investigating on how to find the ticket, unfortunately I was unable find the ticket, no matter what tab I pressed on the Render site. Could you please guide me on how to actually find the ticket where I can reply?

Thanks!

There isn’t currently a ticket UI. The response would be via email.

Alan

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