Skip to content

No module named frontend error. Possible requirements.txt fix for client #4

@tobbelobb

Description

@tobbelobb

Hello, I'm running Ubuntu 22.04

First I followed the Installation Guide (https://github.com/fjiangAI/MMAPIS#installation-guide), then I followed the Run With Three Servers guide (https://github.com/fjiangAI/MMAPIS#run-with-three-servers).

I noticed that server port configuration was missing from the guide. I fixed that and continued on. Upon issuing the streamlit command I got this error:

(MMAPIS_client) torbjorn[~/repos/MMAPIS/client]$ streamlit run app.py --server.port 8002

  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8002
  Network URL: http://192.168.50.42:8002


  A new version of Streamlit is available.

  See what's new at https://discuss.streamlit.io/c/announcements

  Enter the following command to upgrade:
  $ pip install streamlit --upgrade

2025-02-09 13:14:54.334 Uncaught app exception
Traceback (most recent call last):
  File "/home/torbjorn/anaconda3/envs/MMAPIS_client/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
    exec(code, module.__dict__)
  File "/home/torbjorn/repos/MMAPIS/client/app.py", line 5, in <module>
    from MMAPIS.client.utils import *
  File "/home/torbjorn/repos/MMAPIS/client/utils/__init__.py", line 1, in <module>
    from .client_utils import *
  File "/home/torbjorn/repos/MMAPIS/client/utils/client_utils.py", line 22, in <module>
    import fitz
  File "/home/torbjorn/anaconda3/envs/MMAPIS_client/lib/python3.11/site-packages/fitz/__init__.py", line 1, in <module>
    from frontend import *
ModuleNotFoundError: No module named 'frontend'

To get the client streamlit app to run properly I had to do

(MMAPIS_client) torbjorn[~/repos/MMAPIS/client]$ pip uninstall fitz
(MMAPIS_client) torbjorn[~/repos/MMAPIS/client]$ pip uninstall PyMuPDF
(MMAPIS_client) torbjorn[~/repos/MMAPIS/client]$ pip install PyMuPDF

This gave me PyMuPDF 1.25.3 and some version of fitz implicitly via PyMuPDF (I don't know which fitz version it uses). After this the streamlit command worked. The backend and middleware were already working, so now I'm up and running it seems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions