greyli/albumy

Error: No such command "forge". please help.

miaohf opened this issue · 3 comments

(albumy-master) [miaohf@localhost albumy-master]$ flask forge
Usage: flask [OPTIONS] COMMAND [ARGS]...

Error: No such command "forge".
(albumy-master) [miaohf@localhost albumy-master]$ exit
exit
[miaohf@localhost albumy-master]$ su
Password:
[root@localhost albumy-master]# pip install faker
Requirement already satisfied: faker in /usr/lib64/python3.6/site-packages (1.0.5)
Requirement already satisfied: python-dateutil>=2.4 in /usr/lib/python3.6/site-packages (from faker) (2.8.0)
Requirement already satisfied: six>=1.10 in /usr/lib/python3.6/site-packages (from faker) (1.12.0)
Requirement already satisfied: text-unidecode==1.2 in /usr/lib/python3.6/site-packages (from faker) (1.2)
You are using pip version 19.0.2, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@localhost albumy-master]# exit
exit
[miaohf@localhost albumy-master]$ pipenv shell
Launching subshell in virtual environment…
[miaohf@localhost albumy-master]$ . /home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/bin/activate
(albumy-master) [miaohf@localhost albumy-master]$ flask forge
Usage: flask [OPTIONS] COMMAND [ARGS]...

Error: No such command "forge".
(albumy-master) [miaohf@localhost albumy-master]$ exit
exit
[miaohf@localhost albumy-master]$
[miaohf@localhost albumy-master]$
[miaohf@localhost albumy-master]$ pipenv install --dev
Installing dependencies from Pipfile.lock (15e1b5)…
Ignoring ipaddress: markers 'python_version == "2.7"' don't match your environment
Looking in indexes: https://pypi.python.org/simple
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 30/30 — 00:00:14
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
[miaohf@localhost albumy-master]$ pipenv shell
Launching subshell in virtual environment…
[miaohf@localhost albumy-master]$ . /home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/bin/activate
(albumy-master) [miaohf@localhost albumy-master]$ flask forge
Usage: flask [OPTIONS] COMMAND [ARGS]...

Error: No such command "forge".
(albumy-master) [miaohf@localhost albumy-master]$ flask run -h 0.0.0.0

  • Serving Flask app "wsgi.py" (lazy loading)
  • Environment: development
  • Debug mode: on
  • Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
  • Restarting with inotify reloader
  • Debugger is active!
  • Debugger PIN: 170-913-317
    192.168.3.156 - - [03/Jun/2019 17:17:27] "GET / HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/lib/python3.6/site-packages/flask/cli.py", line 325, in call
    self._flush_bg_loading_exception()
    File "/home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/lib/python3.6/site-packages/flask/cli.py", line 313, in _flush_bg_loading_exception
    reraise(*exc_info)
    File "/home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
    File "/home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/lib/python3.6/site-packages/flask/cli.py", line 302, in _load_app
    self._load_unlocked()
    File "/home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/lib/python3.6/site-packages/flask/cli.py", line 317, in _load_unlocked
    self._app = rv = self.loader()
    File "/home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/lib/python3.6/site-packages/flask/cli.py", line 372, in load_app
    app = locate_app(self, import_name, name)
    File "/home/miaohf/.local/share/virtualenvs/albumy-master-YKY7lYtz/lib/python3.6/site-packages/flask/cli.py", line 246, in locate_app
    'Could not import "{name}".'.format(name=module_name)
    flask.cli.NoAppException: Could not import "wsgi".
    192.168.3.156 - - [03/Jun/2019 17:17:27] "GET /?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
    192.168.3.156 - - [03/Jun/2019 17:17:27] "GET /?debugger=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
    192.168.3.156 - - [03/Jun/2019 17:17:27] "GET /?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
    192.168.3.156 - - [03/Jun/2019 17:17:27] "GET /?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
    192.168.3.156 - - [03/Jun/2019 17:17:27] "GET /?debugger=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -

Please change your work directory to the root of the project (where you can find Pipfile), then excute pipenv install --dev command to install all the dependency.

Closing for now, please feel free to comment or reopen this issue.

@greyli I meet this problem too, and I can't fix it with your method
I wonder if I can run it within conda environment
2021-03-24 20-24-51 的屏幕截图

ps: 我是在 sayhello 那个项目发现的 😋 不过wachlist那里 forge 没有问题