Pgadmin4: emoji in comments

From: eMerzh <merzhin(at)gmail(dot)com>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Pgadmin4: emoji in comments
Date: 2016-06-03 22:28:30
Message-ID: CAHBQ7mcz8Xyt8smMT7iBLnqX1LnKWCYbApqNC2VpNQUSbQEW4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

i just pulled the latest git,
and tried to display a table with an emoji in comments of the table
and i got an exception...

using python3.5
4398d1d8694024b3f357e74fba4683d5f3cd5745

here is the traceback

2016-06-04 00:23:15,050: ERROR pgadmin: Exception on
/browser/table/sql/1/1/25554/2200/34037 [GET]
Traceback (most recent call last):
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1817, in wsgi_app
response = self.full_dispatch_request()
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/_compat.py",
line 33, in reraise
raise value
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1475, in full_dispatch_request
rv = self.dispatch_request()
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/views.py",
line 84, in view
return self.dispatch_request(*args, **kwargs)
File "/tmp/pgadmin4/web/pgadmin/browser/utils.py", line 233, in
dispatch_request
return method(*args, **kwargs)
File
"/tmp/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
line 328, in wrap
return f(*args, **kwargs)
File
"/tmp/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
line 2437, in sql
data=data, conn=self.conn)
File
"/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/templating.py", line
128, in render_template
context, ctx.app)
File
"/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/templating.py", line
110, in _render
rv = template.render(context)
File
"/tmp/pgadmin4/venv3/lib/python3.5/site-packages/jinja2/environment.py",
line 969, in render
return self.environment.handle_exception(exc_info, True)
File
"/tmp/pgadmin4/venv3/lib/python3.5/site-packages/jinja2/environment.py",
line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/jinja2/_compat.py",
line 36, in reraise
raise value.with_traceback(tb)
File
"/tmp/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.5_plus/create.sql",
line 123, in <module>
IS {{c.description|qtLiteral}};
File "/tmp/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line
1405, in qtLiteral
res = adapt(value).getquoted()
UnicodeEncodeError: 'latin-1' codec can't encode character '\U0001f4a9' in
position 6: ordinal not in range(256)
2016-06-04 00:23:17,443: ERROR pgadmin: Exception on
/browser/table/sql/1/1/25554/2200/34037 [GET]
Traceback (most recent call last):
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1817, in wsgi_app
response = self.full_dispatch_request()
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/_compat.py",
line 33, in reraise
raise value
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1475, in full_dispatch_request
rv = self.dispatch_request()
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/app.py", line
1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/views.py",
line 84, in view
return self.dispatch_request(*args, **kwargs)
File "/tmp/pgadmin4/web/pgadmin/browser/utils.py", line 233, in
dispatch_request
return method(*args, **kwargs)
File
"/tmp/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
line 328, in wrap
return f(*args, **kwargs)
File
"/tmp/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
line 2437, in sql
data=data, conn=self.conn)
File
"/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/templating.py", line
128, in render_template
context, ctx.app)
File
"/tmp/pgadmin4/venv3/lib/python3.5/site-packages/flask/templating.py", line
110, in _render
rv = template.render(context)
File
"/tmp/pgadmin4/venv3/lib/python3.5/site-packages/jinja2/environment.py",
line 969, in render
return self.environment.handle_exception(exc_info, True)
File
"/tmp/pgadmin4/venv3/lib/python3.5/site-packages/jinja2/environment.py",
line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/tmp/pgadmin4/venv3/lib/python3.5/site-packages/jinja2/_compat.py",
line 36, in reraise
raise value.with_traceback(tb)
File
"/tmp/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.5_plus/create.sql",
line 123, in <module>
IS {{c.description|qtLiteral}};
File "/tmp/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line
1405, in qtLiteral
res = adapt(value).getquoted()
UnicodeEncodeError: 'latin-1' codec can't encode character '\U0001f4a9' in
position 6: ordinal not in range(256)

btw, sorry to reach you guys directly but i can't post on *-hackers and
don't think there is a bug tracker somewhere?

regards,

Brice

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Neel Patel 2016-06-04 08:49:37 [pgAdmin4][Debugger][Patch]: RM-1225 - Debugger start error if function contains special characters
Previous Message Surinder Kumar 2016-06-03 22:14:56 [pgAdmin4][Patch]: RM#1184 - Re-docking on the main tabset is broken