Re: Can't launch setup.py in Docker image - module named 'flask'

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: Alexey Murz Korepov <murznn(at)gmail(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Can't launch setup.py in Docker image - module named 'flask'
Date: 2021-12-13 06:28:19
Message-ID: CAM9w-_ndtK4guA_Jyvr-exmFPe5MfFUUPa8xAfNH+ir1jyd+5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgadmin-support

On Mon, Dec 13, 2021 at 11:46 AM Alexey Murz Korepov <murznn(at)gmail(dot)com>
wrote:

> ow, sorry, in /venv/bin it works, thanks!
>
Great !!

>
> On Mon, Dec 13, 2021 at 9:14 AM Aditya Toshniwal <
> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>
>> Hey,
>>
>>
>> On Mon, Dec 13, 2021 at 11:36 AM Alexey Murz Korepov <murznn(at)gmail(dot)com>
>> wrote:
>>
>>> Thanks for advice, I've tried, and see the same error:
>>> ---
>>> /pgadmin4 $ /usr/bin/python3 /pgadmin4/setup.py --load-servers
>>> /pgadmin4/servers.json
>>>
>> Not from /usr/bin. Try from /venv/bin
>>
>>> Traceback (most recent call last):
>>> File "/pgadmin4/setup.py", line 33, in <module>
>>> from pgadmin.model import db, User, Version, ServerGroup, Server, \
>>> File "/pgadmin4/pgadmin/__init__.py", line 23, in <module>
>>> from flask import Flask, abort, request, current_app, session,
>>> url_for
>>> ModuleNotFoundError: No module named 'flask'
>>> ---
>>>
>>> On Mon, Dec 13, 2021 at 8:42 AM Aditya Toshniwal <
>>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>>
>>>> Hi Alexey,
>>>>
>>>> Can you try with - /venv/bin/python3 /pgadmin4/setup.py ?
>>>>
>>>> On Fri, Dec 10, 2021 at 1:53 PM Alexey Murz Korepov <murznn(at)gmail(dot)com>
>>>> wrote:
>>>>
>>>>> I'm trying to debug why the server settings are not applied from the
>>>>> /pgadmin4/servers.json file in Docker container (with clean
>>>>> /var/lib/pgadmin directory), via manually launch this process:
>>>>>
>>>>> python3 /pgadmin4/setup.py --load-servers /pgadmin4/servers.json
>>>>>
>>>>> but got the error:
>>>>> ---
>>>>> Traceback (most recent call last):
>>>>> File "/pgadmin4/setup.py", line 33, in <module>
>>>>> from pgadmin.model import db, User, Version, ServerGroup, Server, \
>>>>> File "/pgadmin4/pgadmin/__init__.py", line 23, in <module>
>>>>> from flask import Flask, abort, request, current_app, session,
>>>>> url_for
>>>>> ModuleNotFoundError: No module named 'flask'
>>>>> ---
>>>>>
>>>>> So, if it can't be launched manually, it must fail on automatic
>>>>> servers import process too?
>>>>>
>>>>> Is this a missing package in Docker image, or some misconfiguration?
>>>>>
>>>>> And is there any other ways to debug the applying servers.json process?
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Alexey Murz Korepov.
>>>>> E-mail: murznn(at)gmail(dot)com
>>>>> Messengers: Matrix - https://matrix.to/#/@murz:ru-matrix.org Telegram
>>>>> - @MurzNN
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks,
>>>> Aditya Toshniwal
>>>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>>>> <http://edbpostgres.com>
>>>> "Don't Complain about Heat, Plant a TREE"
>>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Alexey Murz Korepov.
>>> E-mail: murznn(at)gmail(dot)com
>>> Messengers: Matrix - https://matrix.to/#/@murz:ru-matrix.org Telegram -
>>> @MurzNN
>>>
>>
>>
>> --
>> Thanks,
>> Aditya Toshniwal
>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>> <http://edbpostgres.com>
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> Best regards,
> Alexey Murz Korepov.
> E-mail: murznn(at)gmail(dot)com
> Messengers: Matrix - https://matrix.to/#/@murz:ru-matrix.org Telegram -
> @MurzNN
>

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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Aditya Toshniwal 2021-12-13 07:25:46 [pgAdmin][RM7020] Status message hides last line of messages when running a query
Previous Message Akshay Joshi 2021-12-13 05:56:33 Re: Translators: Release next week

Browse pgadmin-support by date

  From Date Subject
Next Message priscilla sofia 2021-12-13 21:52:53 Re: Iam facing Fatal Error Pg-Admin server could not contacted
Previous Message Aditya Toshniwal 2021-12-13 05:41:38 Re: Can't launch setup.py in Docker image - module named 'flask'