Hi Levente,

Please try installing from pgAdmin team built installer -
https://www.pgadmin.org/download/pgadmin-4-rpm/

On Wed, Oct 28, 2020 at 4:10 PM Levente Birta <blevi.li...@gmail.com> wrote:

>
> Hello,
>
> I use pgadmin4 with server installation, on Centos7, installed from
> official postgresql yum repo.
>
> I'm on 4.27 now, but since v4.24, IIRC, I got error when I try to
> visualize the SQL for a table:
> INTERNAL SERVER ERROR ... expected token 'end of statement block', got  '.'
>
> For views, foreign tables or any other stuff is working ...
>
> Any ideas?
> Thanks
> Levi
>
>
> The apache error log:
>
> [Thu Oct 08 10:29:05.260331 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105] 2020-10-08 10:29:05,259: ERROR\tflask.app:\texpected
> token 'end of statement block', got '.'
> [Thu Oct 08 10:29:05.260347 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105] Traceback (most recent call last):
> [Thu Oct 08 10:29:05.260350 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/flask/app.py", line 1813,
> in full_dispatch_request
> [Thu Oct 08 10:29:05.260352 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     rv = self.dispatch_request()
> [Thu Oct 08 10:29:05.260353 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/flask/app.py", line 1799,
> in dispatch_request
> [Thu Oct 08 10:29:05.260361 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return
> self.view_functions[rule.endpoint](**req.view_args)
> [Thu Oct 08 10:29:05.260363 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/flask/views.py", line 88,
> in view
> [Thu Oct 08 10:29:05.260365 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return self.dispatch_request(*args, **kwargs)
> [Thu Oct 08 10:29:05.260367 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/pgadmin/browser/utils.py",
> line 313, in dispatch_request
> [Thu Oct 08 10:29:05.260369 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return method(*args, **kwargs)
> [Thu Oct 08 10:29:05.260371 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py",
>
> line 158, in wrap
> [Thu Oct 08 10:29:05.260373 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return f(*args, **kwargs)
> [Thu Oct 08 10:29:05.260374 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>
> line 1388, in sql
> [Thu Oct 08 10:29:05.260376 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     self, did=did, scid=scid, tid=tid,
> main_sql=main_sql, data=data)
> [Thu Oct 08 10:29:05.260378 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py",
>
> line 770, in get_reverse_engineered_sql
> [Thu Oct 08 10:29:05.260380 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     self._get_resql_for_table(did, scid, tid, data,
> json_resp, main_sql)
> [Thu Oct 08 10:29:05.260382 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py",
>
> line 495, in _get_resql_for_table
> [Thu Oct 08 10:29:05.260383 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     data=data, conn=self.conn, is_sql=True)
> [Thu Oct 08 10:29:05.260385 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/flask/templating.py",
> line 134, in render_template
> [Thu Oct 08 10:29:05.260387 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return
> _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
> [Thu Oct 08 10:29:05.260388 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/environment.py",
> line 851, in get_or_select_template
> [Thu Oct 08 10:29:05.260390 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return self.get_template(template_name_or_list,
> parent, globals)
> [Thu Oct 08 10:29:05.260392 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/environment.py",
> line 812, in get_template
> [Thu Oct 08 10:29:05.260393 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return self._load_template(name,
> self.make_globals(globals))
> [Thu Oct 08 10:29:05.260395 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/environment.py",
> line 786, in _load_template
> [Thu Oct 08 10:29:05.260397 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     template = self.loader.load(self, name, globals)
> [Thu Oct 08 10:29:05.260398 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/loaders.py", line
> 125, in load
> [Thu Oct 08 10:29:05.260400 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     code = environment.compile(source, name, filename)
> [Thu Oct 08 10:29:05.260407 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/environment.py",
> line 565, in compile
> [Thu Oct 08 10:29:05.260409 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     self.handle_exception(exc_info,
> source_hint=source_hint)
> [Thu Oct 08 10:29:05.260411 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/environment.py",
> line 754, in handle_exception
> [Thu Oct 08 10:29:05.260412 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     reraise(exc_type, exc_value, tb)
> [Thu Oct 08 10:29:05.260414 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/_compat.py", line
> 37, in reraise
> [Thu Oct 08 10:29:05.260415 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     raise value.with_traceback(tb)
> [Thu Oct 08 10:29:05.260417 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/create.sql",
>
> line 88, in template
> [Thu Oct 08 10:29:05.260419 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     {% if data.fillfactor %}{% set ns.add_comma = true%}
> [Thu Oct 08 10:29:05.260421 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/environment.py",
> line 470, in _parse
> [Thu Oct 08 10:29:05.260422 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return Parser(self, source, name,
> encode_filename(filename)).parse()
> [Thu Oct 08 10:29:05.260424 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 897, in parse
> [Thu Oct 08 10:29:05.260426 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     result = nodes.Template(self.subparse(), lineno=1)
> [Thu Oct 08 10:29:05.260427 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 879, in subparse
> [Thu Oct 08 10:29:05.260429 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     rv = self.parse_statement()
> [Thu Oct 08 10:29:05.260430 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 121, in parse_statement
> [Thu Oct 08 10:29:05.260432 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return getattr(self, 'parse_' +
> self.stream.current.value)()
> [Thu Oct 08 10:29:05.260434 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 203, in parse_if
> [Thu Oct 08 10:29:05.260435 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     'name:endif'))
> [Thu Oct 08 10:29:05.260437 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 156, in parse_statements
> [Thu Oct 08 10:29:05.260438 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     result = self.subparse(end_tokens)
> [Thu Oct 08 10:29:05.260440 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 879, in subparse
> [Thu Oct 08 10:29:05.260442 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     rv = self.parse_statement()
> [Thu Oct 08 10:29:05.260443 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 121, in parse_statement
> [Thu Oct 08 10:29:05.260445 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return getattr(self, 'parse_' +
> self.stream.current.value)()
> [Thu Oct 08 10:29:05.260446 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 203, in parse_if
> [Thu Oct 08 10:29:05.260450 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     'name:endif'))
> [Thu Oct 08 10:29:05.260451 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 156, in parse_statements
> [Thu Oct 08 10:29:05.260453 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     result = self.subparse(end_tokens)
> [Thu Oct 08 10:29:05.260455 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 879, in subparse
> [Thu Oct 08 10:29:05.260456 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     rv = self.parse_statement()
> [Thu Oct 08 10:29:05.260458 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 121, in parse_statement
> [Thu Oct 08 10:29:05.260459 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     return getattr(self, 'parse_' +
> self.stream.current.value)()
> [Thu Oct 08 10:29:05.260461 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 175, in parse_set
> [Thu Oct 08 10:29:05.260463 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     drop_needle=True)
> [Thu Oct 08 10:29:05.260464 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/parser.py", line
> 155, in parse_statements
> [Thu Oct 08 10:29:05.260466 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     self.stream.expect('block_end')
> [Thu Oct 08 10:29:05.260467 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]   File
> "/usr/lib/python3.6/site-packages/pgadmin4-web/jinja2/lexer.py", line
> 374, in expect
> [Thu Oct 08 10:29:05.260469 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]     self.name, self.filename)
> [Thu Oct 08 10:29:05.260472 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105] jinja2.exceptions.TemplateSyntaxError: expected token
> 'end of statement block', got '.'
> [Thu Oct 08 10:29:05.260477 2020] [wsgi:error] [pid 1047] [remote
> ip.ad.re.ss:53105]
>
>
>

-- 
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com>
"Don't Complain about Heat, Plant a TREE"

Reply via email to