Re: AttributeError module builtins has no attribute SERVER_MODE

From: Dave Page <dpage(at)pgadmin(dot)org>
To: sicasley(at)hotmail(dot)com
Cc: "pgadmin-support lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: AttributeError module builtins has no attribute SERVER_MODE
Date: 2018-11-16 01:50:28
Message-ID: CA+OCxoy7EbtSRANMLBemkmVJxgR1GDi5usuOPmSJR_HoVkq9QA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi

On Thu, Nov 15, 2018 at 8:36 PM Simon Casley <sicasley(at)hotmail(dot)com> wrote:

> Hi - When running setup.py for pgAdmin4 v3.5, I get the following error:
>
> (pgadmin435) root(at)cclgis01-dev:/opt/webapps/pgAdmin4/pgadmin435/lib/python3.5/site-packages/pgadmin4#
> python setup.py
> Traceback (most recent call last):
> File "setup.py", line 15, in <module>
> from pgadmin.model import db, Version, SCHEMA_VERSION as
> CURRENT_SCHEMA_VERSION
> File
> "/opt/webapps/pgAdmin4/pgadmin435/lib/python3.5/site-packages/pgadmin4/pgadmin/__init__.py",
> line 33, in <module>
> from pgadmin.utils.session import create_session_interface,
> pga_unauthorised
> File
> "/opt/webapps/pgAdmin4/pgadmin435/lib/python3.5/site-packages/pgadmin4/pgadmin/utils/session.py",
> line 26, in <module>
> import config
> File
> "/opt/webapps/pgAdmin4/pgadmin435/lib/python3.5/site-packages/pgadmin4/config.py",
> line 121, in <module>
> if builtins.SERVER_MODE is None:
> AttributeError: module 'builtins' has no attribute 'SERVER_MODE'
>
> Any idea what the issue is?
>

Yes - see
https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff;h=29ed7ec8815b301952846543d6f9155a7e416a48;hp=220fdf583e6848f2e6b52a2df121967cf37d2831

You can work around it either by just running pgAdmin4.py, which will
invoke setup.py in a way that should work just fine, or modify your
config.py file as per the change at the link above.

Apologies for any inconvenience!

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message yxq 2018-11-16 08:06:19 pgAdmin4 loses the file format
Previous Message Simon Casley 2018-11-16 01:36:09 AttributeError module builtins has no attribute SERVER_MODE