-
Notifications
You must be signed in to change notification settings - Fork 4
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
"flask database init" fails on "Requirement.parse('MarkupSafe>=2.0'), {'Jinja2'}" #82
Comments
Hi, you have an version conflict: MarkupSafe 1.1.0 is installed, but >= 2.0 is needed. To prevend this I strongly recommend you to use virtual environments (see installation point 2). |
Meisterschueler, I still can not install ogn-python even by virtual environments. I run the following commands. git clone https://github.com/glidernet/ogn-python.git The last command produces (my_environment) caz@ogn-python:~/ogn-python$ flask database init What am I missing? |
Sorry, my mistake. You must also set the environment variable "FLASK_APP". I just updated the readme. |
Here are commands I run. sudo apt-get install -y python3-venv I have .... I am glad if you give me an advice for the person who has never administrated a database. |
Do you have a postgres database "ogn" and a postgres user "postgres" with the default password "postgres"? If not, you must modify the database connection string in the config.py from |
I believe "yes, I have a postgres database ogn and a postgres user postgres with the default password postgres" because you see the following lines in my previous comment. create database ogn I have not error or warning message for those 3 lines. |
Hi, it is a little tricky to analyze this problem from remote... could you set a breakpoint to the code line where the errors occures and check if the password is correct? |
By the following print line,
I have
This is the expected arguments, correct? So the problem is postgres database side. I wonder whether I configured database correctly by the following lines.
These lines are exact typing except for #^D which I type control-D. |
Thank you for fixing #77.
I still have an installation problem.
git clone https://github.com/glidernet/ogn-python.git
cd ogn-python
pip3 install -r requirements.txt
sudo apt install -y postgresql-12-postgis-3 redis-server python3-sqlalchemy python3-flask
; logout-login
flask database init
Traceback (most recent call last):
File "/home/caz/.local/bin/flask", line 8, in
sys.exit(main())
File "/home/caz/.local/lib/python3.8/site-packages/flask/cli.py", line 990, in main
cli.main(args=sys.argv[1:])
File "/home/caz/.local/lib/python3.8/site-packages/flask/cli.py", line 596, in main
return super().main(*args, **kwargs)
File "/home/caz/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/caz/.local/lib/python3.8/site-packages/click/core.py", line 1662, in invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
File "/home/caz/.local/lib/python3.8/site-packages/click/core.py", line 1709, in resolve_command
cmd = self.get_command(ctx, cmd_name)
File "/home/caz/.local/lib/python3.8/site-packages/flask/cli.py", line 539, in get_command
self._load_plugin_commands()
File "/home/caz/.local/lib/python3.8/site-packages/flask/cli.py", line 535, in _load_plugin_commands
self.add_command(ep.load(), ep.name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2444, in load
self.require(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2467, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (MarkupSafe 1.1.0 (/usr/lib/python3/dist-packages), Requirement.parse('MarkupSafe>=2.0'), {'Jinja2'})
$ cat /usr/lib/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
You do not touch Jinja2 nor MakupSafe as below. Your code does not use them too. What am I missing?
$ git log --grep Jinja2
$ git log --grep MarkupSafe
$
The text was updated successfully, but these errors were encountered: