-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: UI is accessible, active modules work, but marketplace is empty and config files are not loading #163
Comments
I was able to solve the bug. Install Jinja==3.1.0 and flask==2.2.0
Shell commands:
After this I got another error in the mmpm.api logs:
I could solve this by installing an old version of Werkzeug: https://stackoverflow.com/questions/77213053/why-did-flask-start-failing-with-importerror-cannot-import-name-url-quote-fr |
Maybe it would make sense to specify the package-dependencies more strictly in the requirements.txt of the mmpm Python module. This way incompatibilities like that should not be a problem. |
@KKdev15 what version of |
@KKdev15 also, I'm unsure of how you have dependencies = [
"Flask-Cors>=3.0.8",
"argcomplete>=2.0.0",
"argparse>=1.4",
"beautifulsoup4>=4.11.1",
"colorama>=0.4.3",
"flask-socketio>=5.3.2",
"flask>=2.2.0",
"gevent>=23.9.1",
"gunicorn>=20.1.0",
"jinja2>=3.1.0",
"pygments>=2.12.0",
"python-socketio[client]>=5.7.0",
"requests>=2.28.0",
"yaspin>=2.3.0",
"pip>=23.3.1",
"gitpython>=3.1.40",
"gevent-websocket>=0.10.1",
"prompt-toolkit>=3.0.43",
"importlib_resources; python_version<'3.9'",
] |
@Bee-Mar I have installed the latest version (4.1.0) of mmpm. I guess the problem was, that I also have the plugin MMM-FastNotes installed. It's dependencies (flask == 1.1.2) are conflicting with the dependencies of mmpm. Anyway MMM-FastNotes seems to work with the mmpm dependencies as well... A general question from my side: Is it possible to install different versions of the same package to make sure, that each package has exactly the dependencies it requires? I'm not a Node.js expert, but maybe there is something like venvs in Python? |
@KKdev15 ah, well that's not something I expected. Yep, python has virtual environments. You could install python3 -m venv venv # creates a virtualenv named 'venv'
source venv/bin/activate
python3 -m pip install mmpm You'd have run Another option is to use python3 -m pip install pipx
pipx install mmpm Then just run Something else that could be interesting from my end is detecting if the module being installed has python requirements and prompting the user if they want to setup the module in a virtualenv and having mmpm handle that so things are isolated. |
@KKdev15 one issue with that module is they made the requirements too strict. Requiring version numbers with |
@KKdev15 in short, for simplicity sake, I'd recommend the following: python3 -m pip uninstall mmpm
python3 -m pip install pipx
pipx install mmpm Then go about things how you normally would. The should resolve the issue. |
@KKdev15 I'm going to close this issue since the problem was related to another MagicMirror module. If you're still having issues feel free to respond in this thread or email me. |
@Bee-Mar Hi, I've had the same issue after installing FastNotes, and I've followed your code block, but it hasn't helped! do you have a suggestion? |
Additional: HTML inspector shows CORS is being blocked. How do I fix this? |
Describe the Bug
Is this an issue with the CLI or GUI?
GUI
Is this something that should be put in the Wiki?
NO
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to see modules that are available for install in Marketplace and the config files in the Config Editor
Screenshots
Operating System, Python3 Version, and Web Browser
(Please complete the following information)
cat /etc/os-release
output from
python3 --version
Python 3.9.2
Web Browser (firefox, chrome, safari, chromium, etc)
Chrome
MMPM Environment Settings
mmpm env
MMPM Log Files
Download MMPM log files
within the Control Center of the GUI or from themmpm log --zip
mmpm-logs-2024-1-14.zip
MagicMirror Config
config.js
Additional Information
From the error shown in the Screenshots, I assumed, that the error war part of the mmpm.api process started by pm2. Therefore I checked the logs and found the following error repeating constantly:
From this Stackoverflow issue, I figured out, that maybe the used version of Flask and jinja don't match: https://stackoverflow.com/questions/71718167/importerror-cannot-import-name-escape-from-jinja2
Is this a general dependency problem in mmpm or is this just on my Raspi? If it is just on my Raspi, which version of Flask and jinja do I need and how do I install them into the correct place? Are Flask and jinja installed globally?
Thanks!
EDIT
These are the moduled installed on my Raspi (Flask = 1.1.2 and Jinja2 = 3.1.3):
The text was updated successfully, but these errors were encountered: