Re: Pgadmin4: emoji in comments

From: Dave Page <dpage(at)pgadmin(dot)org>
To: eMerzh <merzhin(at)gmail(dot)com>
Cc: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Pgadmin4: emoji in comments
Date: 2016-06-06 08:02:53
Message-ID: CA+OCxoye2afTxePw1SSk-T0-ZggqoM2okBTF77hStxq1rchf5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Fri, Jun 3, 2016 at 11:28 PM, eMerzh <merzhin(at)gmail(dot)com> wrote:
> 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?

You seem to have posted on -hackers, though I had to approve it :-)

The bug tracker can be found here:
https://redmine.postgresql.org/projects/pgadmin4/issues

I'll log this one for now - thanks!

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Sandeep Thakkar 2016-06-06 08:15:54 Re: Patch for pgAdmin4 RPM package
Previous Message Murtuza Zabuawala 2016-06-06 07:05:29 PATCH: Security label was not properly handled (pgAdmin4)