Re: pgAdmin 4 as Web application

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "Ashesh Vashi *EXTERN*" <ashesh(dot)vashi(at)enterprisedb(dot)com>, "pgadmin-hackers(at)postgresql(dot)org" <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgAdmin 4 as Web application
Date: 2016-09-05 08:30:05
Message-ID: CA+OCxoyV-WqkeOQkukaUkvBPtp5zWgL7e_XP7+S6V9bOKEUkdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Mon, Sep 5, 2016 at 8:08 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> Dave Page wrote:
>> On Fri, Sep 2, 2016 at 1:45 PM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
>>> Now I get the following error:
>>>
>>> mod_wsgi (pid=20880): Target WSGI script '/opt/pgadmin4/pgAdmin4.wsgi' cannot be loaded as Python module.
>>> mod_wsgi (pid=20880): Exception occurred processing WSGI script '/opt/pgadmin4/pgAdmin4.wsgi'.
>>> Traceback (most recent call last):
>>> File "/opt/pgadmin4/pgAdmin4.wsgi", line 8, in <module>
>>> from pgAdmin4 import app as application
>>> File "/opt/pgadmin4/pgAdmin4.py", line 58, in <module>
>>> app = create_app()
>>> File "/opt/pgadmin4/pgadmin/__init__.py", line 204, in create_app
>>> import pgadmin.utils.paths as paths
>>> AttributeError: 'module' object has no attribute 'paths'
>>>
>>> Indeed there is no pgadmin/utils/paths directory with a __init__.py in it.
>>
>> No, but there should be a pgadmin/utils/paths.py file. Is that there?
>
> Yes, there is, and it is readable to everyone.
>
> I don't know much about Python - could it be that version 2.7 handles this
> line differently from 3?

No - I do all my development on 2.7 and it works fine (as do most of
the other devs I believe). 3.x is definitely less well tested, and 2.6
is behind that.

Ashesh, any ideas what could be causing this?

> I'll see what I can find out with strace.

Thanks.

>> FYI, I'm running a test server on CentOS 7 - my Apache config looks like this:
>>
>> WSGIDaemonProcess pgadmin processes=1 threads=25
>> WSGIScriptAlias /pgadmin4 /opt/pgAdmin4/web/pgAdmin4.wsgi
>>
>> <Directory /opt/pgAdmin4/web>
>> WSGIProcessGroup pgadmin
>> WSGIApplicationGroup %{GLOBAL}
>> Require all granted
>> </Directory>
>>
>> That's working with the pgAdmin4.wsgi file unmodified from git.
>
> Mine looks the same (except for the paths and a ServerName directive).
>
> I think it's a Python problem rather than a web server problem.
>
> Thanks for your help!
> I really want to get it running so I and my co-workers can test.
>
> Yours,
> Laurenz Albe

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

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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Surinder Kumar 2016-09-05 09:51:19 [pgAdmin4][Patch]: Wrong listing of directories in File Manager in Windows Only.
Previous Message Albe Laurenz 2016-09-05 07:08:35 Re: pgAdmin 4 as Web application