Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f9ANN-0000Ue-Jv for pgadmin-support@arkaria.postgresql.org; Thu, 19 Apr 2018 14:17:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f9ANM-0001Fd-It for pgadmin-support@arkaria.postgresql.org; Thu, 19 Apr 2018 14:17:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f9ANM-0001FQ-2i; Thu, 19 Apr 2018 14:17:28 +0000 Received: from mail-vk0-x234.google.com ([2607:f8b0:400c:c05::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f9ANI-0005Ou-S3; Thu, 19 Apr 2018 14:17:26 +0000 Received: by mail-vk0-x234.google.com with SMTP id 203so3256546vka.12; Thu, 19 Apr 2018 07:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-language:thread-index; bh=ZBISTrecYRNIeVpovsbTMxGzlSuG4CXKisjzKTtJudg=; b=jgQ2Vhbjl2563yf6JRd6lc21ccF0BskOxmdqXMk44Xl8LMQhaTqgZy9qCMpnpbsjrP cuL5bVoTipKpfJdvdEWrlIbpPh9mjFqL6jpw1Nykff4ANQkmng46a95dKqZhrSoFDYUL XQksp4PSjmV/zw2ocJ8ElPe7rhim+egJmTmfQCQ/R6U4x91a1bDxKDjL4Vusl92ycajM SYFbC11UeVIuk3EsUWaJply57R3nhdkI+lDdX8wm5jJKmf4hi0wglFNQNVUABAnzqQUO 0tWZaQmT1+H0jNmBTEfYSntnVyhkgGoYgyA4EKRh1T1GMNIDjEHmlQhsGazLdAXjQWGE QYAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-language:thread-index; bh=ZBISTrecYRNIeVpovsbTMxGzlSuG4CXKisjzKTtJudg=; b=L2fNzLixg3Dq3sBMBfudMiIyzFHl1kGshxaWhJnwYHruMguaiKQlDfUDwdALR3ym3C pSUbGI++oHEDmZri3vDVe6qvMt/aFyNyGBootZxpL2jhe7PNp/WWWQZz30ow6Z9wq7Nw kuZFEDbR1gXkAUSp1GxKFq04Pq8SNnnfCcHRptX+WsRk1eTokWqhQmpuuVC0p+68mwj8 ekVyvQ7M6jwkZPsPUR++OvjLG8UY5CXAXgzpHclbII69aMSAx5dWu4LTsFZxtCQyeYRN SVLc163bNgry9RnQzR/+VEa+ITSHbOdqPbqwPmQSQEqFrg9do8lzU2H8I8V62Gf3iXIu 7snw== X-Gm-Message-State: ALQs6tAn82BclgBuUtf7H459Q4vOcca5rRS4byoTbhQfMNx6nPPpu+fu y0TaX3GXAWvQFA6HE9lzXMA= X-Google-Smtp-Source: AIpwx4/SOeZzdpKJxPunjsIGQjq4gb4jUIeDiY4ZWI143v8Jdujw1FeO+c4ucmxREH06wzszRjbXJg== X-Received: by 10.31.228.5 with SMTP id b5mr4721819vkh.120.1524147443476; Thu, 19 Apr 2018 07:17:23 -0700 (PDT) Received: from irylachi ([200.55.161.75]) by smtp.gmail.com with ESMTPSA id 64sm1802723uao.6.2018.04.19.07.17.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:17:22 -0700 (PDT) From: "Lazaro Garcia" To: "'Khushboo Vashi'" Cc: "'pgAdmin Support'" , "'pgsql-admin'" References: <006701d3d71b$e097cd10$a1c76730$@gmail.com> In-Reply-To: Subject: RE: Possible bug on code autocomplete pgadmin V 3.0 Date: Thu, 19 Apr 2018 10:17:19 -0400 Message-ID: <001401d3d7e9$21aa0a20$64fe1e60$@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0015_01D3D7C7.9A9D2510" X-Mailer: Microsoft Outlook 15.0 Content-Language: es-mx Thread-Index: AQGZtdP2kiPIwTioPtqNsY2SACEqNgMObmyXpGPx9hA= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multipart message in MIME format. ------=_NextPart_000_0015_01D3D7C7.9A9D2510 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the answer.=20 =20 The python version is: Python 2.7.12 =20 For reproducing go to query tool and table fields are not autocompleted = for instance: =20 Select person.{ctrl+space does not autocomplete table fields, the error = is triggered here} from person =20 regards =20 De: Khushboo Vashi [mailto:khushboo.vashi@enterprisedb.com]=20 Enviado el: mi=C3=A9rcoles, 18 de abril de 2018 11:44 p. m. Para: Lazaro Garcia CC: pgAdmin Support Asunto: Re: Possible bug on code autocomplete pgadmin V 3.0 =20 Hi, =20 On Wed, Apr 18, 2018 at 7:18 PM, Lazaro Garcia > wrote: Hello everyone in the list. After installing pgadmin4 V 3.0 from source, = the autocomplete code on query tool is not working, these errors are = logged in my apache-error.log. I think this is a bug. Is there any help = to solve that? =20 I couldn't reproduce this issue. Please provide the exact steps to reproduce it and your python version. PgAdmin4 was installed from source code and running behind apache2.4 = server on Ubuntu Server 16.04 =20 Regards =20 =20 [Tue Apr 17 13:27:27.741741 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] mod_wsgi = (pid=3D4921): Exception occurred processing WSGI script = '/var/www/vhosts/pgadmin4/web/pgAdmin4.wsgi'. [Tue Apr 17 13:27:27.741915 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] Traceback (most = recent call last): [Tue Apr 17 13:27:27.741945 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in = __call__ [Tue Apr 17 13:27:27.741987 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] return = self.wsgi_app(environ, start_response) [Tue Apr 17 13:27:27.742006 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in = wsgi_app [Tue Apr 17 13:27:27.742033 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] response =3D = self.handle_exception(e) [Tue Apr 17 13:27:27.742051 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in = handle_exception [Tue Apr 17 13:27:27.742078 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] reraise(exc_type, = exc_value, tb) [Tue Apr 17 13:27:27.742095 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in = wsgi_app [Tue Apr 17 13:27:27.742121 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] response =3D = self.full_dispatch_request() [Tue Apr 17 13:27:27.742138 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in = full_dispatch_request [Tue Apr 17 13:27:27.742165 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] rv =3D = self.handle_user_exception(e) [Tue Apr 17 13:27:27.742182 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in = handle_user_exception [Tue Apr 17 13:27:27.742208 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] reraise(exc_type, = exc_value, tb) [Tue Apr 17 13:27:27.742225 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in = full_dispatch_request [Tue Apr 17 13:27:27.742252 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] rv =3D = self.dispatch_request() [Tue Apr 17 13:27:27.742269 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in = dispatch_request [Tue Apr 17 13:27:27.742295 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] return = self.view_functions[rule.endpoint](**req.view_args) [Tue Apr 17 13:27:27.742313 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 792, in = decorated_view [Tue Apr 17 13:27:27.742340 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] return = func(*args, **kwargs) [Tue Apr 17 13:27:27.742357 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/var/www/vhosts/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", line = 1231, in auto_complete [Tue Apr 17 13:27:27.742391 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] res =3D = auto_complete_obj.get_completions(full_sql, text_before_cursor) [Tue Apr 17 13:27:27.742409 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/autocomplete.= py", line 239, in get_completions [Tue Apr 17 13:27:27.742436 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] suggestions =3D = self.suggest_type(text, text_before_cursor) [Tue Apr 17 13:27:27.742453 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/autocomplete.= py", line 721, in suggest_type [Tue Apr 17 13:27:27.742481 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] last_token, = text_before_cursor, full_text, identifier [Tue Apr 17 13:27:27.742505 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/autocomplete.= py", line 833, in suggest_based_on_last_token [Tue Apr 17 13:27:27.742533 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] tables =3D = extract_tables(full_text) [Tue Apr 17 13:27:27.742551 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/parseutils.py= ", line 193, in extract_tables [Tue Apr 17 13:27:27.742578 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] return = tuple(identifiers) [Tue Apr 17 13:27:27.742595 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/parseutils.py= ", line 130, in extract_table_identifiers [Tue Apr 17 13:27:27.742623 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] for item in = token_stream: [Tue Apr 17 13:27:27.742640 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/parseutils.py= ", line 93, in extract_from_part [Tue Apr 17 13:27:27.742667 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] if = is_subselect(item): [Tue Apr 17 13:27:27.742684 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/parseutils.py= ", line 76, in is_subselect [Tue Apr 17 13:27:27.742711 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] if not = parsed.is_group(): [Tue Apr 17 13:27:27.742736 2018] [wsgi:error] [pid 4921] [remote = 192.168.5.130:45348 ] TypeError: 'bool' = object is not callable =20 Thanks, Khushboo ------=_NextPart_000_0015_01D3D7C7.9A9D2510 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Thanks for the answer. =

 

The python version is: Python = 2.7.12

 

For reproducing go to query tool and table = fields are not autocompleted for instance:

 

Select person.{ctrl+space does not autocomplete table = fields, the error is triggered here} from person

 

regards

 

De:<= /b> = Khushboo Vashi [mailto:khushboo.vashi@enterprisedb.com]
Enviado = el: mi=C3=A9rcoles, 18 de abril de 2018 11:44 p. m.
Para: = Lazaro Garcia
CC: pgAdmin Support
Asunto: Re: = Possible bug on code autocomplete pgadmin V 3.0

 

Hi,

 

On Wed, = Apr 18, 2018 at 7:18 PM, Lazaro Garcia <lazaro3487@gmail.com> = wrote:

Hello everyone in the list. After installing pgadmin4 V 3.0 = from source, the autocomplete code  on query tool is not working, = these errors are logged in my apache-error.log. I think this is a bug. = Is there any help to solve that?

 

I couldn't reproduce this = issue.

Please provide the = exact steps to reproduce it and your python = version.

PgAdmin4 was installed from source code and running behind = apache2.4 server on Ubuntu Server = 16.04

 

Regards

 

 

[Tue Apr 17 13:27:27.741741 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348] mod_wsgi (pid=3D4921): = Exception occurred processing WSGI script = '/var/www/vhosts/pgadmin4/web/pgAdmin4.wsgi'.

[Tue Apr 17 13:27:27.741915 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348] Traceback (most recent call = last):

[Tue Apr 17 13:27:27.741945 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line = 1997, in __call__

[Tue Apr 17 13:27:27.741987 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = return self.wsgi_app(environ, start_response)

[Tue Apr 17 13:27:27.742006 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line = 1985, in wsgi_app

[Tue Apr 17 13:27:27.742033 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = response =3D self.handle_exception(e)

[Tue Apr 17 13:27:27.742051 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line = 1540, in handle_exception

[Tue Apr 17 13:27:27.742078 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = reraise(exc_type, exc_value, tb)

[Tue Apr 17 13:27:27.742095 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line = 1982, in wsgi_app

[Tue Apr 17 13:27:27.742121 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = response =3D self.full_dispatch_request()

[Tue Apr 17 13:27:27.742138 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line = 1614, in full_dispatch_request

[Tue Apr 17 13:27:27.742165 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     rv = =3D self.handle_user_exception(e)

[Tue Apr 17 13:27:27.742182 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line = 1517, in handle_user_exception

[Tue Apr 17 13:27:27.742208 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = reraise(exc_type, exc_value, tb)

[Tue Apr 17 13:27:27.742225 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line = 1612, in full_dispatch_request

[Tue Apr 17 13:27:27.742252 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     rv = =3D self.dispatch_request()

[Tue Apr 17 13:27:27.742269 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask/app.py", line = 1598, in dispatch_request

[Tue Apr 17 13:27:27.742295 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = return = self.view_functions[rule.endpoint](**req.view_args)

=

[Tue Apr 17 13:27:27.742313 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/usr/local/lib/python2.7/dist-packages/flask_login.py", line = 792, in decorated_view

[Tue Apr 17 13:27:27.742340 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = return func(*args, **kwargs)

[Tue Apr 17 13:27:27.742357 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/var/www/vhosts/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py&qu= ot;, line 1231, in auto_complete

[Tue Apr 17 13:27:27.742391 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     res = =3D auto_complete_obj.get_completions(full_sql, = text_before_cursor)

[Tue Apr 17 13:27:27.742409 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/autocomp= lete.py", line 239, in get_completions

[Tue Apr 17 13:27:27.742436 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = suggestions =3D self.suggest_type(text, = text_before_cursor)

[Tue Apr 17 13:27:27.742453 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/autocomp= lete.py", line 721, in suggest_type

[Tue Apr 17 13:27:27.742481 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = last_token, text_before_cursor, full_text, = identifier

[Tue Apr 17 13:27:27.742505 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/autocomp= lete.py", line 833, in = suggest_based_on_last_token

[Tue Apr 17 13:27:27.742533 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = tables =3D extract_tables(full_text)

[Tue Apr 17 13:27:27.742551 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/parseuti= ls.py", line 193, in extract_tables

[Tue Apr 17 13:27:27.742578 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     = return tuple(identifiers)

[Tue Apr 17 13:27:27.742595 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/parseuti= ls.py", line 130, in = extract_table_identifiers

[Tue Apr 17 13:27:27.742623 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     for = item in token_stream:

[Tue Apr 17 13:27:27.742640 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/parseuti= ls.py", line 93, in extract_from_part

[Tue Apr 17 13:27:27.742667 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     if = is_subselect(item):

[Tue Apr 17 13:27:27.742684 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]   File = "/var/www/vhosts/pgadmin4/web/pgadmin/utils/sqlautocomplete/parseuti= ls.py", line 76, in is_subselect

[Tue Apr 17 13:27:27.742711 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348]     if = not parsed.is_group():

[Tue Apr 17 13:27:27.742736 2018] [wsgi:error] [pid 4921] = [remote 192.168.5.130:45348] TypeError: 'bool' object is = not callable

 

Thanks,

Khushboo

------=_NextPart_000_0015_01D3D7C7.9A9D2510--