Errors while trying to start.
Stanlyhalo opened this issue · 8 comments
Hey, I just got to the very end of this manual for setting this dashboard up, and I was going through a trial and error of trying to start than installing packages via pip that weren't installed, and I came across this error when trying to upgrade the db:
Error: While importing 'wsgi', an ImportError was raised:
Traceback (most recent call last):
File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\cli.py", line 214, in locate_app
__import__(module_name)
File "C:\DU\NexusDashboard-main\wsgi.py", line 2, in <module>
from app import create_app
File "C:\DU\NexusDashboard-main\app\__init__.py", line 7, in <module>
from app.models import db, migrate, PlayKey
File "C:\DU\NexusDashboard-main\app\models.py", line 3, in <module>
from flask_user import UserMixin
ModuleNotFoundError: No module named 'flask_user'
Usage: flask [OPTIONS] COMMAND [ARGS]...
Try 'flask --help' for help.
Error: No such command 'db'.
And it seems from posts online that flask_user is out of date or something, and when I try to install it, it can't install it. Also I did install flask_migrate so idk why the db command isn't working. I already have the server working, I can play on the server, and I even have the account manager working. And if I try to run this: gunicorn -b :8000 -w 4 wsgi:app
, I get this:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Scripts\gunicorn.exe\__main__.py", line 4, in <module>
File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Lib\site-packages\gunicorn\app\wsgiapp.py", line 9, in <module>
from gunicorn.app.base import Application
File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Lib\site-packages\gunicorn\app\base.py", line 11, in <module>
from gunicorn import util
File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Lib\site-packages\gunicorn\util.py", line 8, in <module>
import fcntl
ModuleNotFoundError: No module named 'fcntl'
And it seems fcntl isn't installable either. And of course trying to just do flask run
results in in the error with flask_user not being installed.
Edit*: On top of this, when I try to do pip install -r requirements.txt
, I get a ton of errors relating to greenlet.
What python version are you on?
will look into this later, I recommend using the docker container though
I'm using python 3.11.1. I'll look into using the docker, I don't have any of the docker stuff setup yet though.
Edit*: Okay I installed docker, but I don't know how to run the command in the readme, it keeps only doing the first line, and even if I try to put the lines together (with a space between each line ofc), it errors because it's an invalid command.
Edit*: I just needed to remove the "\", I'm still new to docker, so idk what to do after this.
ty, I think it's an issue with python 3.11, and I've gotten it before, I'll check to see if I can repo again and then will try to fix. I wrote this in 3.8, so that may be the issue
Okay, I just installed an configured Python 3.8.0, the installation of packages seemed to go without any issue, however running flask db upgrade
still outputs:
Usage: flask [OPTIONS] COMMAND [ARGS]...
Try 'flask --help' for help.
Error: No such command 'db'.
I did try flask run
which seemed to run, but when I tried to bootup http://127.0.0.1:5000
in my web browser, it output some errors related to app.py around line 2070, 1515, 1513, 1499, and so on.
Edit*: It seems trying to run the gunicorn command outputs an error stating that there's no module named 'fcntl', so I attempted to install it via pip and I get this error:
ERROR: Could not find a version that satisfies the requirement fcntl (from versions: none)
ERROR: No matching distribution found for fcntl
It seems fcntl is not on Windows, but there is apparently a good alternative called waitress-serve... but it seems to can't find the module "predict" which I can't seem to install without getting errors lol.
please try using a venv
stale