We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
Configuring preferences.json in container causes AttributeError: 'NoneType' object has no attribute 'append'.
preferences.json
AttributeError: 'NoneType' object has no attribute 'append'
To Reproduce
Steps to reproduce the behavior:
docker-compose.yml
--- networks: mdw: null secrets: preferences.json: file: docker/offline_mode/pgadmin/preferences.json servers.json: file: docker/offline_mode/pgadmin/servers.json services: pgadmin: depends_on: - postgres env_file: - docker/pgadmin/pgadmin.dev.env image: dpage/pgadmin4:8.7 networks: mdw: null ports: - '5050:80' restart: always secrets: - source: servers.json target: /pgadmin4/servers.json - source: preferences.json target: /pgadmin4/preferences.json volumes: - pgadmin:/var/lib/pgadmin
{ "preferences": { "browser:node:show_node_aggregate": false } }
docker-compose up -d --build
Expected behavior
Preferences are taken from preferences.json.
Error message
While initializing container I get the following error:
2024-05-30 17:46:56 SQLite pgAdmin config: /var/lib/pgadmin/pgadmin4.db 2024-05-30 17:46:56 ---------- 2024-05-30 17:46:59 Added 1 Server Group(s) and 1 Server(s). 2024-05-30 17:47:01 ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ 2024-05-30 17:47:01 │ /pgadmin4/setup.py:70 in wrap │ 2024-05-30 17:47:01 │ │ 2024-05-30 17:47:01 │ 67 │ │ if kwargs and kwargs.get('sqlite_path') is not None: │ 2024-05-30 17:47:01 │ 68 │ │ │ # update the sqlite path │ 2024-05-30 17:47:01 │ 69 │ │ │ config.SQLITE_PATH = kwargs['sqlite_path'] │ 2024-05-30 17:47:01 │ ❱ 70 │ │ return f(*args, **kwargs) │ 2024-05-30 17:47:01 │ 71 │ │ 2024-05-30 17:47:01 │ 72 │ return wrap │ 2024-05-30 17:47:01 │ 73 │ 2024-05-30 17:47:01 │ │ 2024-05-30 17:47:01 │ /pgadmin4/setup.py:521 in set_prefs │ 2024-05-30 17:47:01 │ │ 2024-05-30 17:47:01 │ 518 │ │ │ pref_data = data['preferences'] │ 2024-05-30 17:47:01 │ 519 │ │ │ │ 2024-05-30 17:47:01 │ 520 │ │ │ for k, v in pref_data.items(): │ 2024-05-30 17:47:01 │ ❱ 521 │ │ │ │ pref_options.append(k + "=" + str(v)) │ 2024-05-30 17:47:01 │ 522 │ │ │ 2024-05-30 17:47:01 │ 523 │ │ user_id = ManagePreferences.get_user(username, auth_source) │ 2024-05-30 17:47:01 │ 524 │ │ table = Table(title="Updated Pref Details", box=box.ASCII) │ 2024-05-30 17:47:01 ╰──────────────────────────────────────────────────────────────────────────────╯ 2024-05-30 17:47:01 AttributeError: 'NoneType' object has no attribute 'append'
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
Ensure preferences can be loaded using preferences.json.pgadmin-org#7516
9ed4ebf
801345d
Ensure preferences can be loaded using preferences.json. #7516
bdadc77
Issue resolved, verified on the docker snapshot image.
Sorry, something went wrong.
pravesh-sharma
No branches or pull requests
Describe the bug
Configuring
preferences.json
in container causesAttributeError: 'NoneType' object has no attribute 'append'
.To Reproduce
Steps to reproduce the behavior:
preferences.json
indocker-compose.yml
:preferences.json
could be any. Minimal example:docker-compose up -d --build
Expected behavior
Preferences are taken from
preferences.json
.Error message
While initializing container I get the following error:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: