Re: Local variable 'debugger_version' referenced before assignment

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: "Fontana Daniel C (Desartec S(dot)R(dot)L(dot))" <desartecsrl(at)gmail(dot)com>
Cc: "pgadmin-support lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: Local variable 'debugger_version' referenced before assignment
Date: 2020-08-05 04:23:44
Message-ID: CAM9w-_mdBdsz9wp3s9V99RaY_nt1DznbHO3fCFUUSb=UBjobZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi Fontana,

It may be possible that you've set the search_path to something other than
public. And so, the function pldbg_get_proxy_info is not found.
Please report the bug here -
https://redmine.postgresql.org/projects/pgadmin4/issues/new. I think the
function pldbg_get_proxy_info should be called with the apt. schema
qualified name.

On Wed, Aug 5, 2020 at 3:41 AM Fontana Daniel C (Desartec S.R.L.) <
desartecsrl(at)gmail(dot)com> wrote:

> Hello:
> After enabling en file postgresql.conf shared_preload_libraries = '$
> libdir/plugin_debugger.dll'
> and installing the pldbgapi extension.
> I try to debug a created function and pgadmin4 displays the following
> error.
>
> Local variable 'debugger_version' referenced before assignment.
>
> This variable is not in my function, what is the error.
>
> PostgreSQL 12.2, compiled by Visual C++ build 1914, 64-bit (Windows 2019)
> PgAdmin 4.23
>
> The pgadmin4 log says:
>
> ---------------------------------
> 2020-08-04 18:11:33,826: ERROR flask.app: Failed to execute query
> (execute_scalar) for the server #2 - CONN:9214613 (Query-id: 1047347):
> Error Message:ERROR: no existe la funci├│n pldbg_get_proxy_info() LINE
> 1: SELECT proxyapiver FROM pldbg_get_proxy_info();
> ^
> HINT: Ninguna funci├│n coincide en el nombre y tipos de argumentos.
> Puede ser necesario agregar conversión explícita de tipos.
>
> 2020-08-04 18:11:33,827: ERROR flask.app: local variable
> 'debugger_version' referenced before assignment
> Traceback (most recent call last):
> File "C:/Program Files/PostgreSQL/12/pgAdmin 4/venv/Lib/site-
> packages\flask\app.py", line 1813, in full_dispatch_request
> rv = self.dispatch_request()
> File "C:/Program Files/PostgreSQL/12/pgAdmin 4/venv/Lib/site-
> packages\flask\app.py", line 1799, in dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
> File "C:/Program Files/PostgreSQL/12/pgAdmin 4/venv/Lib/site-
> packages\flask_login\utils.py", line 261, in decorated_view
> return func(*args, **kwargs)
> File "C:\Program Files\PostgreSQL\12\pgAdmin
> 4\web\pgadmin\tools\debugger\__init__.py", line 747, in initialize_target
> current_app.logger.debug("Debugger version is: %d", debugger_version)
> UnboundLocalError: local variable 'debugger_version' referenced before
> assignment
> ---------------------------------
>
> I found the problem. If the scheme is "pulic" it works correctly, with
> another scheme the error occurs.
> Why can't I use another scheme?
> Note that SELECT proxyapiver FROM pldbg_get_proxy_info ();
> It is not placing the schema correctly where I am working, in my case "dba"
> And now what do I do?
>
>
>
>
>

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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Aditya Toshniwal 2020-08-05 10:09:21 Re: Local variable 'debugger_version' referenced before assignment
Previous Message Fontana Daniel C (Desartec S.R.L.) 2020-08-04 22:11:03 Local variable 'debugger_version' referenced before assignment