Re: Can't install pgadmin4 on linux (flask required)
От | Dave Page |
---|---|
Тема | Re: Can't install pgadmin4 on linux (flask required) |
Дата | |
Msg-id | CA+OCxoyjS33r=+PbF7NVOyw9my8-fhUQGK5YdHqJuDH=7q8W0w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Can't install pgadmin4 on linux (flask required) (Mark Murawski <markm-lists@intellasoft.net>) |
Список | pgadmin-support |
Hi
On Wednesday, November 2, 2016, Mark Murawski <markm-lists@intellasoft.net> wrote:
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Wednesday, November 2, 2016, Mark Murawski <markm-lists@intellasoft.net> wrote:
On 11/2/16 8:01 AM, Dave Page wrote:Hi
On Tuesday, November 1, 2016, Mark Murawski <markm-lists@intellasoft.net> wrote:On 11/01/16 12:58, Mark Murawski wrote:----------------------------The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/markm/download/pgadmin4/web/pgAdmin4.py", line 46, in <module>
app = create_app()
File "/home/markm/download/pgadmin4/web/pgadmin/__init__.py", line 208, in create_app
version = Version.query.filter_by(name='ConfigDB').first()
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/orm/query.py", line 2659, in first
ret = list(self[0:1])
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/orm/query.py", line 2457, in __getitem__
return list(res)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/orm/query.py", line 2761, in __iter__
return self._execute_and_instances(context)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/sql/elements.py" , line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
exc_info
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/util/compat.py", line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/util/compat.py", line 185, in reraise
raise value.with_traceback(tb)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packag es/sqlalchemy/engine/default.p y", line 450, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: version [SQL: 'SELECT version.name AS version_name, version.value AS version_value \nFROM version \nWHERE version.name = ?\n LIMIT ? OFFSET ?'] [parameters: ('ConfigDB', 1, 0)]
"Failed to launch the application server, server thread exiting."Sounds like your earlier attempt created a broken config database. Try 'rm ~/.pgadmin/pgadmin4.db' (or whatever would be appropriate for the settings you have) and then start pgAdmin again. It should recreate the database and start up if all is well.Regards, Dave.
Cool. Deleted the DB and now it started up. Seems to be working now.
Great. FYI, I just committed a change to better detect and handle issues where the config database isn't properly created.
Is there a way to import my db connection list from pgadmin3?
No, sorry.
I'm sure you already know, in this day and age, users want things to 'just work'. I know pgadmin4 is a young project, but here's a number of things that will help boost adoption and make for an overall better experience.
Suggestions so far:
- Update requirements_py3.txt -- django-htmlmin==0.10.0
- Pre or post-make, check for dependencies on virtualenv and all that. if on debian environment, recommend install of virtualenvwrapper
Yeah, I'd like to figure out how to automatically check the environment at startup. It wouldn't be tied to make - we don't really want users to have to deal with that at all, but would rather have packages built.
- Post-build auto setup script for virtualenv
-- Detect default python version based on the qmake results
-- Detect path if possible of virtualenvwrapper based on host-distro, if path not detected, bail or attempt to download/install automatically?
-- create virtual env for pgadmin4
-- pip install dependencies for pgadmin4 in the new virtualenv
-- create wrapper script to start pgadmin4 using this new virtualenv, instruct users to use this for launching app
Most of that should really be handled by packagers - it's very system/distro specific and would be quite difficult for us to automate.
-- Detect broken database (if core schema parts are missing) and ask user if it's okay to rebuild
That's essentially what I just committed. If the config database seems to be broken, it will move it out of the way (telling you where it put it) and ask you to restart pgAdmin to recreate it. Fully automating that is somewhat non-trivial, and not really worth the effort for such a corner case.
Thanks, Dave.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
В списке pgadmin-support по дате отправления: