-
Notifications
You must be signed in to change notification settings - Fork 796
Closed
Labels
Milestone
Description
Describe the bug
Running:
is_valid_email=$(cd /pgadmin4/pgadmin/utils && /venv/bin/python3 -c "from validation_utils import validate_email; val = validate_email('${PGADMIN_DEFAULT_EMAIL}', ${email_config}); print(val)")
as part of entrypoint.sh
Results in the following:
Traceback
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/pgadmin4/pgadmin/utils/validation_utils.py", line 19, in validate_email
import config
File "/pgadmin4/config.py", line 33, in <module>
from pgadmin.utils import env, IS_WIN, fs_short_path
File "/pgadmin4/pgadmin/__init__.py", line 24, in <module>
from flask import Flask, abort, request, current_app, session, url_for
File "/venv/lib/python3.12/site-packages/flask/__init__.py", line 5, in <module>
from . import json as json
File "/venv/lib/python3.12/site-packages/flask/json/__init__.py", line 6, in <module>
from ..globals import current_app
File "/venv/lib/python3.12/site-packages/flask/globals.py", line 6, in <module>
from werkzeug.local import LocalProxy
File "/venv/lib/python3.12/site-packages/werkzeug/__init__.py", line 1, in <module>
from .serving import run_simple as run_simple
File "/venv/lib/python3.12/site-packages/werkzeug/serving.py", line 28, in <module>
from http.server import BaseHTTPRequestHandler
File "/usr/lib/python3.12/http/server.py", line 93, in <module>
import html
File "/pgadmin4/pgadmin/utils/html.py", line 12, in <module>
from html import escape as html_escape
ImportError: cannot import name 'escape' from partially initialized module 'html' (most likely due to a circular import) (/pgadmin4/pgadmin/utils/html.py)
I was trying to set admin@localhost as a default email when running the pgAdmin4 Docker image locally, and when I couldn't make it work I looked deeper.
To Reproduce
Steps to reproduce the behavior:
- start a pgadmin4 Docker container
- Run the same command when
docker execinto the container - See the error
Expected behavior
The email validation script should run without any errors.
Error message
See Traceback in the description of the bug
Desktop (please complete the following information):
- OS: OS X Sequoia
- Version: 15.3
- Mode: Server
- Browser (if running in server mode): Chrome
- Package type: Container
Additional context
n/a