Re: ValueError: unsupported format character 'D' - Mailing list pgadmin-support

From George
Subject Re: ValueError: unsupported format character 'D'
Date
Msg-id 1606122216661-0.post@n3.nabble.com
Whole thread Raw
In response to ValueError: unsupported format character 'D'  (Sekretarka Rafala <sekretarka.rafala@gmail.com>)
List pgadmin-support
Hello ,  I also encountered this issue while I staring the pgAdmin4 on
CentOS7.

Fixed it by changing "%" to "%%" in file
/pgadmin/browser/register_browser_preferences.py". 
It's python usage for processing a variable which has pre- and post- "%",
such as "%%DATABASE%%". 
you can try.

/[Fri Nov 20 16:26:44.077735 2020] [wsgi:error] [pid 38774:tid
139824286275328] [remote ::1:55110]   File
"/usr/lib/python3.6/site-packages/pgadmin4-web/pgadmin/browser/register_browser_preferences.py",
line 461, in register_browser_preferences
[Fri Nov 20 16:26:44.077741 2020] [wsgi:error] [pid 38774:tid
139824286275328] [remote ::1:55110]     'Supported placeholders are
%DATABASE%, %USERNAME%, and %SERVER%. '
/
====-----------------------
457         gettext("Query tool tab title"),
458         'text', '%DATABASE%/%USERNAME%@%SERVER%',
459         category_label=PREF_LABEL_DISPLAY,
460         help_str=gettext(
461             'Supported placeholders are %%DATABASE%%, %%USERNAME%%, and
%%SERVER%%. '
462             'Users can provide any string with or without placeholders
of'
463             ' their choice. The blank title will be revert back to the'
464             ' default title with placeholders.'
465         )
466     )
467
468     self.ve_edt_tab_title = self.preference.register(
469         'tab settings', 'vw_edt_tab_title_placeholder',
470         gettext("View/Edit data tab title"),
471         'text',
'%%SCHEMA%%.%%TABLE%%/%%DATABASE%%/%%USERNAME%%@%%SERVER%%',
472         category_label=PREF_LABEL_DISPLAY,
473         help_str=gettext(
474             'Supported placeholders are %%SCHEMA%%, %%TABLE%%,
%%DATABASE%%, '
475             '%%USERNAME%%, and %%SERVER%%. Users can provide any string
with or '
476             'without placeholders of their choice. The blank title will
be '
477             'revert back to the default title with placeholders.'
478         )
479     )
480
481     self.debugger_tab_title = self.preference.register(
482         'tab settings', 'debugger_tab_title_placeholder',
483         gettext("Debugger tab title"),
484         'text', '%%FUNCTION%%(%%ARGS%%)',
485         category_label=PREF_LABEL_DISPLAY,
486         help_str=gettext(
487             'Supported placeholders are %%FUNCTION%%, %%ARGS%%,
%%SCHEMA%% and'
488             ' %%DATABASE%%. Users can provide any string with or '
489             'without placeholders of their choice. The blank title will
be'
490             ' revert back to the default title with placeholders.'
491         )
492     )
493
494     self.open_in_new_tab = self.preference.register(
495         'tab settings', 'new_browser_tab_open',
496         gettext("Open in new browser tab"), 'select2', None,
497         category_label=PREF_LABEL_OPTIONS,
498         options=[{'label': gettext('Query Tool'), 'value': 'qt'},
499                  {'label': gettext('Debugger'), 'value': 'debugger'},




--
Sent from: https://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html



pgadmin-support by date:

Previous
From: Ashesh Vashi
Date:
Subject: Re: Failed to configure the Python Environment
Next
From: Dave Page
Date:
Subject: Re: PG Admin 4 Does not open with new version Mac OS 11