Thread: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
[pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Akshay Joshi
Date:
Hi Hackers,
Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.
--

Akshay Joshi
Sr. Software Architect

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Mobile: +91 976-788-8246
Attachment
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Dave Page
Date:
Hi
On Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
-- Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.
This doesn't work for me. If I add a new row and enter:
\\server\path\to\file
as a value, I get the following on the Messages tab:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
And this on the Python (3.6) console:
2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -
2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:
Traceback (most recent call last):
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgi
execute(self.server.app)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 258, in execute
application_iter = app(environ, start_response)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask_login.py", line 792, in decorated_view
return func(*args, **kwargs)
File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", line 785, in save
default_conn)
File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/command.py", line 858, in save
item['select_sql'], res['rows'][0])
File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 1147, in execute_dict
self.__internal_blocking_execute(cur, query, params)
File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 659, in __internal_blocking_execute
params = self.escape_params_sqlascii(params)
File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in escape_params_sqlascii
for key, val in params.items()
File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in <genexpr>
for key, val in params.items()
AttributeError: 'int' object has no attribute 'encode'
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Dave Page
Date:
Sidenote: This does seem like something we should have a test for.
On Fri, Sep 14, 2018 at 3:32 PM, Dave Page <dpage@pgadmin.org> wrote:
HiOn Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com--> wrote: Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.This doesn't work for me. If I add a new row and enter:\\server\path\to\fileas a value, I get the following on the Messages tab:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>And this on the Python (3.6) console:2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:Traceback (most recent call last):File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/werkzeug/serving.py", line 270, in run_wsgi execute(self.server.app)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/werkzeug/serving.py", line 258, in execute application_iter = app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/_compat.py", line 33, in reraise raise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/_compat.py", line 33, in reraise raise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask_login.py", line 792, in decorated_view return func(*args, **kwargs)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__ init__.py", line 785, in save default_conn)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/ command.py", line 858, in save item['select_sql'], res['rows'][0])File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/ psycopg2/connection.py", line 1147, in execute_dict self.__internal_blocking_execute(cur, query, params) File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/ psycopg2/connection.py", line 659, in __internal_blocking_execute params = self.escape_params_sqlascii(params) File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/ psycopg2/connection.py", line 636, in escape_params_sqlascii for key, val in params.items()File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/ psycopg2/connection.py", line 636, in <genexpr> for key, val in params.items()AttributeError: 'int' object has no attribute 'encode'Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Akshay Joshi
Date:
Hi Dave
--

On Fri, Sep 14, 2018 at 8:02 PM, Dave Page <dpage@pgadmin.org> wrote:
HiOn Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.This doesn't work for me. If I add a new row and enter:\\server\path\to\fileas a value, I get the following on the Messages tab:
This works fine for me, I have enter the same value and data is stored. I have tested it with character varying column. Though I have found some other issues as well. If I fix one issue then another will get introduce, so not concluded yet how to fix this and currently working on it.
--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>And this on the Python (3.6) console:2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:Traceback (most recent call last):File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/werkzeug/serving.py", line 270, in run_wsgi execute(self.server.app)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/werkzeug/serving.py", line 258, in execute application_iter = app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/_compat.py", line 33, in reraise raise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/_compat.py", line 33, in reraise raise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site- packages/flask_login.py", line 792, in decorated_view return func(*args, **kwargs)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__ init__.py", line 785, in save default_conn)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/ command.py", line 858, in save item['select_sql'], res['rows'][0])File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/ psycopg2/connection.py", line 1147, in execute_dict self.__internal_blocking_execute(cur, query, params) File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/ psycopg2/connection.py", line 659, in __internal_blocking_execute params = self.escape_params_sqlascii(params) File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/ psycopg2/connection.py", line 636, in escape_params_sqlascii for key, val in params.items()File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/ psycopg2/connection.py", line 636, in <genexpr> for key, val in params.items()AttributeError: 'int' object has no attribute 'encode'Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Akshay Joshi
Sr. Software Architect

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Mobile: +91 976-788-8246
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Akshay Joshi
Date:
Hi Hackers,
Attached is the modified patch with regression tests.
--

On Wed, Sep 19, 2018 at 11:32 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi DaveOn Fri, Sep 14, 2018 at 8:02 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.This doesn't work for me. If I add a new row and enter:\\server\path\to\fileas a value, I get the following on the Messages tab:This works fine for me, I have enter the same value and data is stored. I have tested it with character varying column. Though I have found some other issues as well. If I fix one issue then another will get introduce, so not concluded yet how to fix this and currently working on it.--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>And this on the Python (3.6) console:2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:Traceback (most recent call last):File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/werkzeug/serving.py", line 270, in run_wsgi execute(self.server.app)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/werkzeug/serving.py", line 258, in execute application_iter = app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/_compat.py", line 33, in reraise raise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/_compat.py", line 33, in reraise raise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packa ges/flask_login.py", line 792, in decorated_view return func(*args, **kwargs)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__ini t__.py", line 785, in save default_conn)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/comma nd.py", line 858, in save item['select_sql'], res['rows'][0])File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2 /connection.py", line 1147, in execute_dict self.__internal_blocking_execute(cur, query, params) File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2 /connection.py", line 659, in __internal_blocking_execute params = self.escape_params_sqlascii(params) File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2 /connection.py", line 636, in escape_params_sqlascii for key, val in params.items()File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2 /connection.py", line 636, in <genexpr> for key, val in params.items()AttributeError: 'int' object has no attribute 'encode'Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Akshay Joshi
Sr. Software Architect

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Mobile: +91 976-788-8246
Attachment
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Harshal Dhumal
Date:
Hi Akshay,
We can do one minor improvement for python 2. Instead of below check
if type(val) in (str, unicode) :
we can check val against basestring
Thanks,
--
Harshal Dhumal
Sr. Software Engineer
On Thu, Sep 20, 2018 at 8:16 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Hackers,Attached is the modified patch with regression tests.On Wed, Sep 19, 2018 at 11:32 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi DaveOn Fri, Sep 14, 2018 at 8:02 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.This doesn't work for me. If I add a new row and enter:\\server\path\to\fileas a value, I get the following on the Messages tab:This works fine for me, I have enter the same value and data is stored. I have tested it with character varying column. Though I have found some other issues as well. If I fix one issue then another will get introduce, so not concluded yet how to fix this and currently working on it.--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>And this on the Python (3.6) console:2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:Traceback (most recent call last):File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgiexecute(self.server.app)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 258, in executeapplication_iter = app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__return self.wsgi_app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_appresponse = self.handle_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_appresponse = self.full_dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_requestrv = self.handle_user_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_requestrv = self.dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_requestreturn self.view_functions[rule.endpoint](**req.view_args)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask_login.py", line 792, in decorated_viewreturn func(*args, **kwargs)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", line 785, in savedefault_conn)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/command.py", line 858, in saveitem['select_sql'], res['rows'][0])File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 1147, in execute_dictself.__internal_blocking_execute(cur, query, params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 659, in __internal_blocking_executeparams = self.escape_params_sqlascii(params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in escape_params_sqlasciifor key, val in params.items()File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in <genexpr>for key, val in params.items()AttributeError: 'int' object has no attribute 'encode'Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Akshay Joshi
Date:
On Thu, Sep 20, 2018 at 8:38 PM Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi Akshay,We can do one minor improvement for python 2. Instead of below checkif type(val) in (str, unicode) :we can check val against basestring
Fixed. Attached is the updated patch. Thanks
Thanks,--Harshal DhumalSr. Software EngineerOn Thu, Sep 20, 2018 at 8:16 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the modified patch with regression tests.On Wed, Sep 19, 2018 at 11:32 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi DaveOn Fri, Sep 14, 2018 at 8:02 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.This doesn't work for me. If I add a new row and enter:\\server\path\to\fileas a value, I get the following on the Messages tab:This works fine for me, I have enter the same value and data is stored. I have tested it with character varying column. Though I have found some other issues as well. If I fix one issue then another will get introduce, so not concluded yet how to fix this and currently working on it.--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>And this on the Python (3.6) console:2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:Traceback (most recent call last):File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgiexecute(self.server.app)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 258, in executeapplication_iter = app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__return self.wsgi_app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_appresponse = self.handle_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_appresponse = self.full_dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_requestrv = self.handle_user_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_requestrv = self.dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_requestreturn self.view_functions[rule.endpoint](**req.view_args)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask_login.py", line 792, in decorated_viewreturn func(*args, **kwargs)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", line 785, in savedefault_conn)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/command.py", line 858, in saveitem['select_sql'], res['rows'][0])File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 1147, in execute_dictself.__internal_blocking_execute(cur, query, params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 659, in __internal_blocking_executeparams = self.escape_params_sqlascii(params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in escape_params_sqlasciifor key, val in params.items()File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in <genexpr>for key, val in params.items()AttributeError: 'int' object has no attribute 'encode'Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Akshay Joshi
Sr. Software Architect

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Mobile: +91 976-788-8246
Attachment
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Murtuza Zabuawala
Date:
Instead, we can utilize in-built 'six' module which will work in both Py 2.x & 3.x
>>> isinstance(val, string_types)
-- Murtuza
On Thu, Sep 20, 2018 at 8:38 PM Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi Akshay,We can do one minor improvement for python 2. Instead of below checkif type(val) in (str, unicode) :we can check val against basestringThanks,--Harshal DhumalSr. Software EngineerOn Thu, Sep 20, 2018 at 8:16 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the modified patch with regression tests.On Wed, Sep 19, 2018 at 11:32 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi DaveOn Fri, Sep 14, 2018 at 8:02 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.This doesn't work for me. If I add a new row and enter:\\server\path\to\fileas a value, I get the following on the Messages tab:This works fine for me, I have enter the same value and data is stored. I have tested it with character varying column. Though I have found some other issues as well. If I fix one issue then another will get introduce, so not concluded yet how to fix this and currently working on it.--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>And this on the Python (3.6) console:2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:Traceback (most recent call last):File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgiexecute(self.server.app)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 258, in executeapplication_iter = app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__return self.wsgi_app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_appresponse = self.handle_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_appresponse = self.full_dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_requestrv = self.handle_user_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_requestrv = self.dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_requestreturn self.view_functions[rule.endpoint](**req.view_args)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask_login.py", line 792, in decorated_viewreturn func(*args, **kwargs)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", line 785, in savedefault_conn)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/command.py", line 858, in saveitem['select_sql'], res['rows'][0])File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 1147, in execute_dictself.__internal_blocking_execute(cur, query, params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 659, in __internal_blocking_executeparams = self.escape_params_sqlascii(params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in escape_params_sqlasciifor key, val in params.items()File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in <genexpr>for key, val in params.items()AttributeError: 'int' object has no attribute 'encode'Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Akshay Joshi
Date:
Hi Hackers,
Attached is the modified patch using six module. Please review it.
On Fri, Sep 21, 2018 at 12:16 PM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Instead, we can utilize in-built 'six' module which will work in both Py 2.x & 3.x>>> isinstance(val, string_types)-- MurtuzaOn Thu, Sep 20, 2018 at 8:38 PM Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:Hi Akshay,We can do one minor improvement for python 2. Instead of below checkif type(val) in (str, unicode) :we can check val against basestringThanks,--Harshal DhumalSr. Software EngineerOn Thu, Sep 20, 2018 at 8:16 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the modified patch with regression tests.On Wed, Sep 19, 2018 at 11:32 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi DaveOn Fri, Sep 14, 2018 at 8:02 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.This doesn't work for me. If I add a new row and enter:\\server\path\to\fileas a value, I get the following on the Messages tab:This works fine for me, I have enter the same value and data is stored. I have tested it with character varying column. Though I have found some other issues as well. If I fix one issue then another will get introduce, so not concluded yet how to fix this and currently working on it.--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>And this on the Python (3.6) console:2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:Traceback (most recent call last):File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgiexecute(self.server.app)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 258, in executeapplication_iter = app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__return self.wsgi_app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_appresponse = self.handle_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_appresponse = self.full_dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_requestrv = self.handle_user_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_requestrv = self.dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_requestreturn self.view_functions[rule.endpoint](**req.view_args)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask_login.py", line 792, in decorated_viewreturn func(*args, **kwargs)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", line 785, in savedefault_conn)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/command.py", line 858, in saveitem['select_sql'], res['rows'][0])File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 1147, in execute_dictself.__internal_blocking_execute(cur, query, params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 659, in __internal_blocking_executeparams = self.escape_params_sqlascii(params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in escape_params_sqlasciifor key, val in params.items()File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in <genexpr>for key, val in params.items()AttributeError: 'int' object has no attribute 'encode'Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Akshay Joshi
Sr. Software Architect

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Mobile: +91 976-788-8246
Attachment
Re: [pgAdmin4][Patch]: RM #3551 pgAdmin4 doesn't handle \'s in datafields correctly
From
Dave Page
Date:
Thanks - patch applied.
On Tue, Sep 25, 2018 at 1:40 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Hackers,Attached is the modified patch using six module. Please review it.On Fri, Sep 21, 2018 at 12:16 PM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Instead, we can utilize in-built 'six' module which will work in both Py 2.x & 3.x>>> isinstance(val, string_types)-- MurtuzaOn Thu, Sep 20, 2018 at 8:38 PM Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:Hi Akshay,We can do one minor improvement for python 2. Instead of below checkif type(val) in (str, unicode) :we can check val against basestringThanks,--Harshal DhumalSr. Software EngineerOn Thu, Sep 20, 2018 at 8:16 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the modified patch with regression tests.On Wed, Sep 19, 2018 at 11:32 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi DaveOn Fri, Sep 14, 2018 at 8:02 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Fri, Sep 14, 2018 at 12:48 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to fix RM #3551 pgAdmin4 doesn't handle \'s in data fields correctly.This doesn't work for me. If I add a new row and enter:\\server\path\to\fileas a value, I get the following on the Messages tab:This works fine for me, I have enter the same value and data is stored. I have tested it with character varying column. Though I have found some other issues as well. If I fix one issue then another will get introduce, so not concluded yet how to fix this and currently working on it.--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>And this on the Python (3.6) console:2018-09-14 15:30:28,516: INFO werkzeug: 127.0.0.1 - - [14/Sep/2018 15:30:28] "POST /sqleditor/save/4073406 HTTP/1.1" 500 -2018-09-14 15:30:28,522: ERROR werkzeug: Error on request:Traceback (most recent call last):File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgiexecute(self.server.app)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py", line 258, in executeapplication_iter = app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__return self.wsgi_app(environ, start_response)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_appresponse = self.handle_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_appresponse = self.full_dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_requestrv = self.handle_user_exception(e)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exceptionreraise(exc_type, exc_value, tb)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraiseraise valueFile "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_requestrv = self.dispatch_request()File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_requestreturn self.view_functions[rule.endpoint](**req.view_args)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask_login.py", line 792, in decorated_viewreturn func(*args, **kwargs)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/__init__.py", line 785, in savedefault_conn)File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/sqleditor/command.py", line 858, in saveitem['select_sql'], res['rows'][0])File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 1147, in execute_dictself.__internal_blocking_execute(cur, query, params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 659, in __internal_blocking_executeparams = self.escape_params_sqlascii(params)File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in escape_params_sqlasciifor key, val in params.items()File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 636, in <genexpr>for key, val in params.items()AttributeError: 'int' object has no attribute 'encode'Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company