Perfect. This is exactly what I needed. Thank you. I noticed that after rebuilding a completely new virtualenv, that pgadmin still picked up the credentials that I had made for the previous installation. So pgadmin must be storing the encrypted credentials file somewhere outside of the virtualenv directory tree. Is it stored in a home directory/file that is hidden ?
On Thu, Mar 24, 2022 at 9:31 PM Khushboo Vashi < khushboo.va...@enterprisedb.com> wrote: > Hi, > > This is due to Jinja2's yesterday release (v.3.1.0). > As a work around, please downgrade the Jinja2 to resolve this issue. > > $ pip uninstall jinja2 > $ pip install jinja2==3.0.3 > > Thanks, > Khushboo > > > On Fri, Mar 25, 2022 at 2:51 AM David Bear <db...@heritageacademyaz.com> > wrote: > >> I have been running pgadmin for in a virtual environment. Today I >> upgraded to v 4.6.7. Now, starting pgadmin4 throws and exception >> >> >> pgadmin4 >> Traceback (most recent call last): >> File "/home/david/bin/bin/pgadmin4", line 5, in <module> >> from pgadmin4.pgAdmin4 import main >> File >> "/home/david/bin/lib/python3.9/site-packages/pgadmin4/pgAdmin4.py", line >> 98, in <module> >> app = create_app() >> File >> "/home/david/bin/lib/python3.9/site-packages/pgadmin4/pgadmin/__init__.py", >> line 233, in create_app >> app.jinja_env.trim_blocks = True >> File "/home/david/bin/lib/python3.9/site-packages/flask/helpers.py", >> line 777, in __get__ >> return super().__get__(obj, type=type) >> File "/home/david/bin/lib/python3.9/site-packages/werkzeug/utils.py", >> line 97, in __get__ >> value = self.fget(obj) # type: ignore >> File "/home/david/bin/lib/python3.9/site-packages/flask/app.py", line >> 602, in jinja_env >> return self.create_jinja_environment() >> File "/home/david/bin/lib/python3.9/site-packages/flask/app.py", line >> 694, in create_jinja_environment >> rv = self.jinja_environment(self, **options) >> File "/home/david/bin/lib/python3.9/site-packages/flask/templating.py", >> line 42, in __init__ >> BaseEnvironment.__init__(self, **options) >> File >> "/home/david/bin/lib/python3.9/site-packages/jinja2/environment.py", line >> 363, in __init__ >> self.extensions = load_extensions(self, extensions) >> File >> "/home/david/bin/lib/python3.9/site-packages/jinja2/environment.py", line >> 117, in load_extensions >> extension = t.cast(t.Type["Extension"], import_string(extension)) >> File "/home/david/bin/lib/python3.9/site-packages/jinja2/utils.py", >> line 149, in import_string >> return getattr(__import__(module, None, None, [obj]), obj) >> AttributeError: module 'jinja2.ext' has no attribute 'autoescape' >> >> I've tried updating to all the latest versions of things in the >> virtualenv -- incuding jinja2. results of the pip install pgadmin4 >> --force-reinstall were >> >> Attempting uninstall: pgadmin4 >> Found existing installation: pgadmin4 6.7 >> Uninstalling pgadmin4-6.7: >> Successfully uninstalled pgadmin4-6.7 >> Successfully installed Authlib-0.15.5 Babel-2.9.1 Flask-2.0.3 >> Flask-Babel-2.0.0 Flask-Compress-1.11 Flask-Gravatar-0.5.0 >> Flask-Login-0.5.0 Flask-Mail-0.9.1 Flask-Migrate-3.1.0 Flask-Paranoid-0.2.0 >> Flask-Principal-0.4.0 Flask-SQLAlchemy-2.5.1 Flask-Security-Too-4.1.3 >> Flask-SocketIO-5.1.1 Flask-WTF-1.0.0 Jinja2-3.1.0 Mako-1.2.0 >> MarkupSafe-2.1.1 Pillow-9.0.1 SQLAlchemy-1.4.32 WTForms-3.0.1 >> Werkzeug-2.0.3 alembic-1.7.7 bcrypt-3.2.0 bidict-0.22.0 blinker-1.4 >> boto3-1.20.54 botocore-1.23.54 brotli-1.0.9 certifi-2021.10.8 cffi-1.15.0 >> chardet-4.0.0 click-8.0.4 cryptography-3.4.8 dnspython-2.2.1 >> email-validator-1.1.3 eventlet-0.33.0 greenlet-1.1.2 httpagentparser-1.9.2 >> idna-2.10 itsdangerous-2.1.2 jmespath-0.10.0 ldap3-2.9.1 paramiko-2.10.3 >> passlib-1.7.4 pgadmin4-6.7 psutil-5.9.0 psycopg2-binary-2.9.3 pyasn1-0.4.8 >> pycparser-2.21 pynacl-1.5.0 pyotp-2.6.0 python-dateutil-2.8.2 >> python-engineio-4.3.1 python-socketio-5.5.2 pytz-2021.3 qrcode-7.3.1 >> requests-2.25.1 s3transfer-0.5.2 simplejson-3.17.6 six-1.16.0 >> speaklater3-1.4 sqlparse-0.4.2 sshtunnel-0.4.0 ua-parser-0.10.0 >> urllib3-1.26.9 user-agents-2.2.0 >> >> So it seems everything is at the correct levels. Is there a bug in the >> current pgadmin4 code? >> >> >> >> -- >> >> David Bear >> >> IT Manager >> >> Heritage Academy — an *A* rated school >> >> p: 480-461-4429 >> >> w: www.hamesa.com e: db...@heritageacademyaz.com >> >> https://www.facebook.com/HeritageAcademyAZ/ >> >> -- David Bear IT Manager Heritage Academy — an *A* rated school p: 480-461-4429 w: www.hamesa.com e: db...@heritageacademyaz.com https://www.facebook.com/HeritageAcademyAZ/