Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgpIB-0003JH-F6 for pgadmin-hackers@arkaria.postgresql.org; Mon, 05 Sep 2016 08:30:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bgpIB-0001vm-1m for pgadmin-hackers@arkaria.postgresql.org; Mon, 05 Sep 2016 08:30:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bgpIA-0001tD-AF for pgadmin-hackers@postgresql.org; Mon, 05 Sep 2016 08:30:10 +0000 Received: from mail-it0-x236.google.com ([2607:f8b0:4001:c0b::236]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bgpI7-0007mF-DG for pgadmin-hackers@postgresql.org; Mon, 05 Sep 2016 08:30:09 +0000 Received: by mail-it0-x236.google.com with SMTP id i184so136107831itf.1 for ; Mon, 05 Sep 2016 01:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tbWFT/AW4rzW7n0KopQKWKuj/3PvsB0aAj3GzlCd6dk=; b=ZLJJuXNvr6j/B5Ac9rse5n/lDG1ulKFwQejhzWDUyQ0S5wOUg/oaJzr3pge4vX7uiL PaED76+1QQe/4R7EdlalR8PMTUp0kOzoGitLRFndsAW1VvMxSSCkNogGr+2VR9wjFWqx n3MUFlw6g4S+/dVwP5t5q4aUNydLlf2tZAee0O72aGLr12Pfic1hWSQrijjibVFE5Srs SekvHIhzWNIRx7FTS9UbCx3eMAiP9o/YEji7K7qId7og4Q4NmDeeXT0sPIN+PgHwwWrA d7Uz8Ycf+tubICxSfm9bD3H3oxeleHpFnngvRyzK2ua3SeCxeA//Sz6Wf1OoQKkOgxIn 9ORQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tbWFT/AW4rzW7n0KopQKWKuj/3PvsB0aAj3GzlCd6dk=; b=KbyMEPgwCA/hNGbA27hsshlcxeSf2EZRDBzq/k2A2hkuDiZP+c/ccfC0MAlqHSF2d6 QmZVRsLdolibxP9efu39CfYSJY6xAu5J3/3WNHpaGku0LxlE1QE3+UqtX0xxi31eoxc9 Xo+PTTU+rxhbTqgWXrimUdVn3vyyVP1n+SDpbQA8nDSR00+E6nPtj1PCjyYBUN9jwU85 HiH7TlPeIOHAUTb0rStCQT42PGi73OMTI3YJFHB0NEHeOFZHFkHpCe8D1TOcoJ5xj96L 6iwmcdjy6+lNbPjkgsMeu8DE55K63TCm3QcW89eVA4S2P8lvafMg/Ona0LPETT/AJ+Rx DT7g== X-Gm-Message-State: AE9vXwM4PhdlJxlzGTsH6OC8vsSQheHLH33gCz6RHbkLV2wTamQmSiAE9j+/IYHSJd9ZLO1nUSXD+hfRx1T6Lw== X-Received: by 10.36.129.193 with SMTP id q184mr20724273itd.35.1473064206517; Mon, 05 Sep 2016 01:30:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.1.203 with HTTP; Mon, 5 Sep 2016 01:30:05 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 5 Sep 2016 09:30:05 +0100 Message-ID: Subject: Re: pgAdmin 4 as Web application To: Albe Laurenz Cc: "Ashesh Vashi *EXTERN*" , "pgadmin-hackers@postgresql.org" Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org On Mon, Sep 5, 2016 at 8:08 AM, Albe Laurenz wrote: > Dave Page wrote: >> On Fri, Sep 2, 2016 at 1:45 PM, Albe Laurenz 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 >>> from pgAdmin4 import app as application >>> File "/opt/pgadmin4/pgAdmin4.py", line 58, in >>> 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 >> >> >> WSGIProcessGroup pgadmin >> WSGIApplicationGroup %{GLOBAL} >> Require all granted >> >> >> 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 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers