Обсуждение: [pgAdmin4][Patch]: Properly handle builtins.SERVER_MODE variable whenSERVER_MODE is not set
[pgAdmin4][Patch]: Properly handle builtins.SERVER_MODE variable whenSERVER_MODE is not set
От
Surinder Kumar
Дата:
Hi
While configuring pgAdmin4 with Apache mod_wsgi, it fails to run apache server due to python error.
[mod_wsgi (pid=12596): Target WSGI script '/opt/pgadmin4_2/virtualenv/lib/python2.7/site-packages/pgadmin4/pgAdmin4.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=12596): Exception occurred processing WSGI script '/opt/pgadmin4_2/virtualenv/lib/python2.7/site-packages/pgadmin4/pgAdmin4.wsgi'.Traceback (most recent call last): File "/opt/pgadmin4_2/virtualenv/lib/python2.7/site-packages/pgadmin4/pgAdmin4.wsgi", line 20, in <module> import config File "/opt/pgadmin4_2/virtualenv/lib/python2.7/site-packages/pgadmin4/config.py", line 118, in <module> if builtins.SERVER_MODE is None:AttributeError: 'module' object has no attribute 'SERVER_MODE'
Reported by:
Gabriel SánchezPlease find an attached patch.
Thanks,
Surinder
Re: [pgAdmin4][Patch]: Properly handle builtins.SERVER_MODE variablewhen SERVER_MODE is not set
От
Harshal Dhumal
Дата:
On Mon, Sep 18, 2017 at 11:16 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
Hi
While configuring pgAdmin4 with Apache mod_wsgi, it fails to run apache server due to python error.
[mod_wsgi (pid=12596): Target WSGI script '/opt/pgadmin4_2/virtualenv/
lib/python2.7/site-packages/ pgadmin4/pgAdmin4.wsgi' cannot be loaded as Python module. mod_wsgi (pid=12596): Exception occurred processing WSGI script '/opt/pgadmin4_2/virtualenv/ lib/python2.7/site-packages/ pgadmin4/pgAdmin4.wsgi'.Traceback (most recent call last): File "/opt/pgadmin4_2/virtualenv/ lib/python2.7/site-packages/ pgadmin4/pgAdmin4.wsgi", line 20, in <module> import config File "/opt/pgadmin4_2/virtualenv/ lib/python2.7/site-packages/ pgadmin4/config.py", line 118, in <module> if builtins.SERVER_MODE is None:AttributeError: 'module' object has no attribute 'SERVER_MODE' Reported by: Gabriel SánchezPlease find an attached patch.
Thanks,
Surinder
Hi
I'd already sent a suggested fix for this to Ashesh. I've just pushed that (it updates the WSGI file, not the config file).
On Mon, Sep 18, 2017 at 6:46 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
Hi
While configuring pgAdmin4 with Apache mod_wsgi, it fails to run apache server due to python error.
[mod_wsgi (pid=12596): Target WSGI script '/opt/pgadmin4_2/virtualenv/
lib/python2.7/site-packages/ pgadmin4/pgAdmin4.wsgi' cannot be loaded as Python module. mod_wsgi (pid=12596): Exception occurred processing WSGI script '/opt/pgadmin4_2/virtualenv/ lib/python2.7/site-packages/ pgadmin4/pgAdmin4.wsgi'.Traceback (most recent call last): File "/opt/pgadmin4_2/virtualenv/ lib/python2.7/site-packages/ pgadmin4/pgAdmin4.wsgi", line 20, in <module> import config File "/opt/pgadmin4_2/virtualenv/ lib/python2.7/site-packages/ pgadmin4/config.py", line 118, in <module> if builtins.SERVER_MODE is None:AttributeError: 'module' object has no attribute 'SERVER_MODE' Reported by: Gabriel SánchezPlease find an attached patch.
Thanks,
Surinder
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Mon, Sep 18, 2017 at 7:18 AM, Harshal Dhumal <harshaldhumal15@gmail.com> wrote:
I don't think that's relevant any more - it's certainly working for me. Can you check please?
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgAdmin4][Patch]: Properly handle builtins.SERVER_MODE variablewhen SERVER_MODE is not set
От
Surinder Kumar
Дата:
Hi
On Mon, Sep 18, 2017 at 3:05 PM, Dave Page <dpage@pgadmin.org> wrote:
HiI'd already sent a suggested fix for this to Ashesh. I've just pushed that (it updates the WSGI file, not the config file).
Yes, It's a proper fix.
I have tested with latest git pull and it works.
--On Mon, Sep 18, 2017 at 6:46 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote: Hi
While configuring pgAdmin4 with Apache mod_wsgi, it fails to run apache server due to python error.
[mod_wsgi (pid=12596): Target WSGI script '/opt/pgadmin4_2/virtualenv/li
b/python2.7/site-packages/pgad min4/pgAdmin4.wsgi' cannot be loaded as Python module. mod_wsgi (pid=12596): Exception occurred processing WSGI script '/opt/pgadmin4_2/virtualenv/li b/python2.7/site-packages/pgad min4/pgAdmin4.wsgi'.Traceback (most recent call last): File "/opt/pgadmin4_2/virtualenv/li b/python2.7/site-packages/pgad min4/pgAdmin4.wsgi", line 20, in <module> import config File "/opt/pgadmin4_2/virtualenv/li b/python2.7/site-packages/pgad min4/config.py", line 118, in <module> if builtins.SERVER_MODE is None:AttributeError: 'module' object has no attribute 'SERVER_MODE' Reported by: Gabriel SánchezPlease find an attached patch.
Thanks,
SurinderDave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company