Re: pgAdmin support: setup.py --dump-servers

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: Yogesh Mahajan <yogesh(dot)mahajan(at)enterprisedb(dot)com>
Cc: Gavin Fleming <gavin(at)kartoza(dot)com>, "pgadmin-support lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: pgAdmin support: setup.py --dump-servers
Date: 2020-09-23 07:37:57
Message-ID: CAM9w-_k2E1=KpfVSQEuUO8gVbaas4LpYvdRYh07NEuttOeJ1rw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi Gavin,

Alternatively, you could try below. Not the best of solutions but has
worked for few users.
1) cd /Applications/pgAdmin\ 4.app/Contents/Resources/venv
2) ./bin/python ../web/setup.py --dump-servers <path for
pgadmin_dump_servers.json>

On Wed, Sep 23, 2020 at 12:59 PM Yogesh Mahajan <
yogesh(dot)mahajan(at)enterprisedb(dot)com> wrote:

> Hi Gavin,
>
> Please run below commands -
>
> export PYTHONHOME=/Applications/pgAdmin\ 4.app/Contents/Resources/venv
>
>
> /Applications/pgAdmin\
> 4.app/Contents/Resources/venv/bin/python /Applications/pgAdmin\
> 4.app/Contents/Resources/web/setup.py --dump-servers <path for
> pgadmin_dump_servers.json>
>
> Thanks,
> Yogesh Mahajan
> EnterpriseDB Corporation
>
> Phone: +91-9741705709
>
>
> On Tue, Sep 22, 2020 at 8:59 PM Gavin Fleming <gavin(at)kartoza(dot)com> wrote:
>
>> Hi
>>
>> I’m having no luck with setup.py —dump-servers on my Mac, any assistance
>> would be appreciated.
>>
>> MacOS 10.15.6
>> pgAdmin4 v4.26
>>
>> In /Applications/pgAdmin 4.app/Contents/Resources/web
>>
>> I ran source ../venv/bin/activate
>>
>> then tried these variations, all in the (venv):
>>
>> 1
>>
>> python setup.py --dump-servers /Users/Shared/temp/pgadmin.json
>>
>> Traceback (most recent call last):
>> File "setup.py", line 17, in <module>
>> import builtins
>> ImportError: No module named builtins
>>
>> 2
>>
>> python3 setup.py --dump-servers /Users/Shared/temp/pgadmin.json
>>
>> Traceback (most recent call last):
>> File "setup.py", line 18, in <module>
>> from pgadmin.model import db, User, Version, ServerGroup, Server, \
>> File "/Applications/pgAdmin
>> 4.app/Contents/Resources/web/pgadmin/__init__.py", line 19, in <module>
>> from flask import Flask, abort, request, current_app, session, url_for
>> ModuleNotFoundError: No module named ‘flask'
>>
>> 3
>>
>> ./setup.py --dump-servers /Users/Shared/temp/pgadmin.json
>>
>> ./setup.py: line 11: Perform the initial setup of the application, by
>> creating the auth
>> and settings database.: command not found
>> ./setup.py: line 13: import: command not found
>> ./setup.py: line 14: import: command not found
>> ./setup.py: line 15: import: command not found
>> ./setup.py: line 16: import: command not found
>> ./setup.py: line 17: import: command not found
>> from: can't read /var/mail/pgadmin.model
>> ./setup.py: line 22: syntax error near unexpected token `('
>> ./setup.py: line 22: `if 'SERVER_MODE' in globals():’
>>
>> 4
>>
>> pip install builtins
>> DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
>> 2020. Please upgrade your Python as Python 2.7 won't be maintained after
>> that date. A future version of pip will drop support for Python 2.7.
>> Collecting builtins
>> ERROR: Could not find a version that satisfies the requirement builtins
>> (from versions: none)
>> ERROR: No matching distribution found for builtins
>>
>>

--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com>
"Don't Complain about Heat, Plant a TREE"

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Mark Murawski 2020-09-23 23:08:48 Re: How do I tell pgAdmin 4 to not harass me with pointless extra clicks every single time I want to use it?
Previous Message Yogesh Mahajan 2020-09-23 07:28:37 Re: pgAdmin support: setup.py --dump-servers