From: | Vaij Bharamshetty <vaijrb(at)gmail(dot)com> |
---|---|
To: | Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com> |
Cc: | pgadmin-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: PGadmi4 - Unable to set up dev environment |
Date: | 2023-02-06 18:37:06 |
Message-ID: | CAOHTSrry4t=6sEhTh3kjmru0etGdb1ihR1NG9BK2bzcq2ZCDrw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Thank you Aditya, appreciate your help. I still face issues detailed as
below,
*-- Python Version*(venv) [vaij(at)rocky4 runtime]$ python -V
Python 3.9.14
*-- Clean up existing Packages*pip freeze | xargs pip uninstall -y
*-- Install from Requirements*(venv) [vaij(at)rocky4 runtime]$ pip install -r
requirements.txt
*-- One Package did not install *ERROR: Could not find a version that
satisfies the requirement subscription-manager==1.29.30 (from versions:
none)
ERROR: No matching distribution found for subscription-manager==1.29.30
*-- Try running setup*(venv) [vaij(at)rocky4 runtime]$ python3
$PGADMIN4_SRC/web/setup.py
Traceback (most recent call last):
File "/home/vaij/pgadmin4/web/setup.py", line 24, in <module>
import config
File "/home/vaij/pgadmin4/web/config.py", line 25, in <module>
from pgadmin.utils import env, IS_WIN, fs_short_path
File "/home/vaij/pgadmin4/web/pgadmin/__init__.py", line 25, in <module>
from flask_socketio import SocketIO
ModuleNotFoundError: No module named 'flask_socketio'
*-- (Trial and error) Try running with sudo*
(venv) [vaij(at)rocky4 runtime]$ sudo python3 $PGADMIN4_SRC/web/setup.py
[sudo] password for vaij:
Traceback (most recent call last):
File "/home/vaij/pgadmin4/web/setup.py", line 24, in <module>
import config
File "/home/vaij/pgadmin4/web/config.py", line 25, in <module>
from pgadmin.utils import env, IS_WIN, fs_short_path
File "/home/vaij/pgadmin4/web/pgadmin/__init__.py", line 24, in <module>
from flask import Flask, abort, request, current_app, session, url_for
ModuleNotFoundError: No module named 'flask'
*-- Check existing packages and specifically Flask Version*(venv)
[vaij(at)rocky4 runtime]$ pip freeze > pgadmin4_packages.txt
Flask==2.1.2
flatbuffers==1.12
fonttools==4.33.3
frozenlist==1.3.0
fsspec==2022.5.0
*-- Try running python3 $PGADMIN4_SRC/web/setup.py-- Manually install
packages after above is failed for the following*(venv) [vaij(at)rocky4
runtime]$ pip install flask_socketio
flask_babel
flask_login
flask_mail
flask_paranoid
flask_security
email_validator
flask_sqlalchemy
simplejson
flask_migrate
*-- Try running python3 $PGADMIN4_SRC/web/setup.py*(venv) [vaij(at)rocky4
runtime]$ python3 $PGADMIN4_SRC/web/setup.py
2023-02-06 13:29:58,252: INFO pgadmin:
########################################################
2023-02-06 13:29:58,253: INFO pgadmin: Starting pgAdmin 4 v6.19...
2023-02-06 13:29:58,253: INFO pgadmin:
########################################################
2023-02-06 13:29:58,253: DEBUG pgadmin: Python syspath:
['/home/vaij/pgadmin4/web', '/usr/lib64/python39.zip',
'/usr/lib64/python3.9', '/usr/lib64/python3.9/lib-dynload',
'/home/vaij/pgadmin4/runtime/venv/lib64/python3.9/site-packages',
'/home/vaij/pgadmin4/runtime/venv/lib/python3.9/site-packages',
'/home/vaij/.local/lib/python3.9/site-packages',
'/usr/local/lib64/python3.9/site-packages',
'/usr/local/lib/python3.9/site-packages',
'/usr/lib64/python3.9/site-packages', '/usr/lib/python3.9/site-packages']
Traceback (most recent call last):
File "/home/vaij/pgadmin4/web/setup.py", line 220, in <module>
app = create_app()
File "/home/vaij/pgadmin4/web/pgadmin/__init__.py", line 302, in
create_app
app.logger.debug('Available translations: %s' %
babel.list_translations())
File
"/home/vaij/pgadmin4/runtime/venv/lib64/python3.9/site-packages/flask_babel/__init__.py",
line 188, in list_translations
for dirname in get_babel().translation_directories:
File
"/home/vaij/pgadmin4/runtime/venv/lib64/python3.9/site-packages/flask_babel/__init__.py",
line 44, in get_babel
if not hasattr(app, 'extensions'):
File
"/home/vaij/pgadmin4/runtime/venv/lib64/python3.9/site-packages/werkzeug/local.py",
line 316, in __get__
obj = instance._get_current_object() # type: ignore[misc]
File
"/home/vaij/pgadmin4/runtime/venv/lib64/python3.9/site-packages/werkzeug/local.py",
line 513, in _get_current_object
raise RuntimeError(unbound_message) from None
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Attaching pip freeze for your reference.
On Mon, Feb 6, 2023 at 1:05 AM Aditya Toshniwal <
aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
> Hi Vaij,
>
> You're using Flask 2.2.2. But the pgAdmin requirements say:
>
> Flask==2.0.3; python_version <= '3.6'
> Flask==2.1.*; python_version >= '3.7'
>
> Please use pgAdmin requirements.txt to create venv.
>
>
> On Mon, Feb 6, 2023 at 10:57 AM Vaij Bharamshetty <vaijrb(at)gmail(dot)com>
> wrote:
>
>> Hi Aditya,
>>
>> Thank you for reaching out. Please find the attached output.
>>
>> Vaij
>>
>> On Mon, Feb 6, 2023 at 12:01 AM Aditya Toshniwal <
>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>
>>> Hi Vaij,
>>>
>>> Please share pip freeze output. Looks like some issue with Flask version.
>>>
>>> On Sun, Feb 5, 2023 at 10:00 AM Vaij Bharamshetty <vaijrb(at)gmail(dot)com>
>>> wrote:
>>>
>>>> Hi team,
>>>>
>>>> I am trying to set up dev. environment Rocky Linux 9. Despite repeated
>>>> attempts, I am still getting the following errors and need help in
>>>> fixing this.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *Traceback (most recent call last): File
>>>> "/home/vaij/pgadmin4/web/setup.py", line 24, in <module> import config
>>>> File "/home/vaij/pgadmin4/web/config.py", line 25, in <module> from
>>>> pgadmin.utils import env, IS_WIN, fs_short_path File
>>>> "/home/vaij/pgadmin4/web/pgadmin/__init__.py", line 24, in <module> from
>>>> flask import Flask, abort, request, current_app, session, url_for File
>>>> "/home/vaij/pgadmin4/runtime/venv/lib64/python3.9/site-packages/flask/__init__.py",
>>>> line 4, in <module> from . import json as json File
>>>> "/home/vaij/pgadmin4/runtime/venv/lib64/python3.9/site-packages/flask/json/__init__.py",
>>>> line 8, in <module> from ..globals import current_app File
>>>> "/home/vaij/pgadmin4/runtime/venv/lib64/python3.9/site-packages/flask/globals.py",
>>>> line 56, in <module> app_ctx: "AppContext" = LocalProxy( # type:
>>>> ignore[assignment]TypeError: __init__() got an unexpected keyword argument
>>>> 'unbound_message'*
>>>>
>>>> Please do the needful. I would like to join as a contributor.
>>>>
>>>> Thank you,
>>>>
>>>> Vaij
>>>>
>>>>
>>>
>>> --
>>> Thanks,
>>> Aditya Toshniwal
>>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>>> <http://edbpostgres.com>
>>> "Don't Complain about Heat, Plant a TREE"
>>>
>>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Software Architect | *edbpostgres.com*
> <http://edbpostgres.com>
> "Don't Complain about Heat, Plant a TREE"
>
Attachment | Content-Type | Size |
---|---|---|
pgadmin4_packages.txt | text/plain | 3.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Aditya Toshniwal | 2023-02-07 05:35:04 | Re: PGadmi4 - Unable to set up dev environment |
Previous Message | Akshay Joshi | 2023-02-06 11:06:36 | pgAdmin4 v6.20 candidate builds |