Обсуждение: Startup error on RHEL 7
Hi,
Just saw this on my RHEL 7 test box. This is pgadmin4 1.0rc1, Python 2.7,
python-flask-babel-0.11.1:
# /usr/bin/python2 /usr/lib/python2.7/site-packages/pgadmin4-web/pgAdmin4.py
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgAdmin4.py", line 58, in <module>
app = create_app()
File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/__init__.py", line 226, in create_app
driver.init_app(app)
File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/driver/__init__.py", line 40, in init_app
DriverRegistry.load_drivers()
File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/driver/registry.py", line 88, in load_drivers
module = import_module(module_name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/driver/psycopg2/__init__.py", line 33, in <module>
from pgadmin.utils.exception import ConnectionLost
File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/exception.py", line 15, in <module>
from pgadmin.utils.ajax import service_unavailable
File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/ajax.py", line 124, in <module>
def not_implemented(errormsg=_('Not implemented.'), info='', result=None, data=None):
File "/usr/lib/python2.7/site-packages/flask_babel/__init__.py", line 539, in gettext
t = get_translations()
File "/usr/lib/python2.7/site-packages/flask_babel/__init__.py", line 208, in get_translations
return support.NullTranslations()
AttributeError: 'module' object has no attribute 'NullTranslations'
What am I missing here?
Regards,
--
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
On Sun, Sep 11, 2016 at 9:33 AM, Devrim Gündüz <devrim@gunduz.org> wrote:
>
> Hi,
>
> Just saw this on my RHEL 7 test box. This is pgadmin4 1.0rc1, Python 2.7,
> python-flask-babel-0.11.1:
>
> # /usr/bin/python2 /usr/lib/python2.7/site-packages/pgadmin4-web/pgAdmin4.py
> Traceback (most recent call last):
> File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgAdmin4.py", line 58, in <module>
> app = create_app()
> File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/__init__.py", line 226, in create_app
> driver.init_app(app)
> File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/driver/__init__.py", line 40, in init_app
> DriverRegistry.load_drivers()
> File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/driver/registry.py", line 88, in load_drivers
> module = import_module(module_name)
> File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
> __import__(name)
> File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/driver/psycopg2/__init__.py", line 33, in
<module>
> from pgadmin.utils.exception import ConnectionLost
> File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/exception.py", line 15, in <module>
> from pgadmin.utils.ajax import service_unavailable
> File "/usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/utils/ajax.py", line 124, in <module>
> def not_implemented(errormsg=_('Not implemented.'), info='', result=None, data=None):
> File "/usr/lib/python2.7/site-packages/flask_babel/__init__.py", line 539, in gettext
> t = get_translations()
> File "/usr/lib/python2.7/site-packages/flask_babel/__init__.py", line 208, in get_translations
> return support.NullTranslations()
> AttributeError: 'module' object has no attribute 'NullTranslations'
>
> What am I missing here?
Hmm, not sure. Questions:
- What version of Babel?
- I assume (hope) you haven't changed config.py, but what's in
config_distro.py and config_local.py?
- Is the web/pgadmin/translations/ directory present and containing
files (a test French message catalog)?
- Is babel.cfg present?
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Hi Dave, On Mon, 2016-09-12 at 10:05 +0100, Dave Page wrote: > Hmm, not sure. Questions: > > - What version of Babel? python-babel-0.9.6 > - I assume (hope) you haven't changed config.py, but what's in > config_distro.py and config_local.py? $ cat /usr/lib/python2.7/site-packages/pgadmin4-web/config_local.py SERVER_MODE = False HTML_HELP = '/usr/share/doc/pgadmin4-docs/en_US/html/' I don't have config_distro.py > - Is the web/pgadmin/translations/ directory present and containing > files (a test French message catalog)? Yes: /usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/translations /usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/translations/fr /usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/translations/fr/LC_MESSAGES /usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/translations/fr/LC_MESSAGES/messages.mo /usr/lib/python2.7/site-packages/pgadmin4-web/pgadmin/translations/fr/LC_MESSAGES/messages.po > - Is babel.cfg present? Yes: $ cat /usr/lib/python2.7/site-packages/pgadmin4-web/babel.cfg [python: **.py] [jinja2: **/templates/**.html] [jinja2: **/templates/**.js] extensions=jinja2.ext.autoescape,jinja2.ext.with_ Cheers, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
Hi Dave, On Mon, 2016-09-12 at 13:50 +0300, Devrim Gündüz wrote: > > - What version of Babel? > > python-babel-0.9.6 Argh. Upgrading it to 1.3 fixed the issue. Sorry for the noise. Cheers, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
On Mon, Sep 12, 2016 at 11:50 AM, Devrim Gündüz <devrim@gunduz.org> wrote: > > Hi Dave, > > On Mon, 2016-09-12 at 10:05 +0100, Dave Page wrote: > >> Hmm, not sure. Questions: >> >> - What version of Babel? > > python-babel-0.9.6 That's really old - I have 2.3.4. >> - I assume (hope) you haven't changed config.py, but what's in >> config_distro.py and config_local.py? > > $ cat /usr/lib/python2.7/site-packages/pgadmin4-web/config_local.py > SERVER_MODE = False > HTML_HELP = '/usr/share/doc/pgadmin4-docs/en_US/html/' > > I don't have config_distro.py Please move those two lines into config_distro.py - that's intended for distro-specific configuration, whilst config_loca.py is for user-specific. Thanks. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Mon, Sep 12, 2016 at 11:53 AM, Devrim Gündüz <devrim@gunduz.org> wrote: > > Hi Dave, > > On Mon, 2016-09-12 at 13:50 +0300, Devrim Gündüz wrote: > >> > - What version of Babel? >> >> python-babel-0.9.6 > > Argh. Upgrading it to 1.3 fixed the issue. Sorry for the noise. :-) -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi Dave, On Mon, 2016-09-12 at 12:07 +0100, Dave Page wrote: > > I don't have config_distro.py > > Please move those two lines into config_distro.py - that's intended > for distro-specific configuration, whilst config_loca.py is for > user-specific. Done. Cheers, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR