← Back to team overview

agesys-dev team mailing list archive

[Bug 1595648] [NEW] LookupError: unknown encoding when character_set_client is utf8mb4

 

Public bug reported:

When setting MySQL character_set_client to "utf8mb4" to support reading
the full range of emojiis oursql throws a lookup error:

Traceback (most recent call last):
  File "test_utf8mb4.py", line 20, in <module>
    results = cursor.fetchone()
  File "oursqlx/cursor.pyx", line 185, in oursql.Cursor.fetchone (oursqlx/oursql.c:21389)
  File "oursqlx/util.pyx", line 47, in oursql._DictWhateverMixin.fetchone (oursqlx/oursql.c:3863)
  File "oursqlx/statement.pyx", line 496, in oursql._Statement.fetchone (oursqlx/oursql.c:14095)
LookupError: unknown encoding: utf8mb4

This error doesn't occur when setting character set to "utf8" or
"latin1".

Python 2.7.11
oursql 0.9.3.1, 0.9.3.2
MySQL client/server 5.6.24-72.2
Mac OS X 10.10.5

Test script attached using the MySQL test database. No tables required.

** Affects: oursql
     Importance: Undecided
         Status: New


** Tags: utf8mb4

** Attachment added: "Python script connecting with charset utf8mb4"
   https://bugs.launchpad.net/bugs/1595648/+attachment/4689229/+files/test_utf8mb4.py

-- 
You received this bug notification because you are a member of Agesys
Team, which is subscribed to oursql.
https://bugs.launchpad.net/bugs/1595648

Title:
  LookupError: unknown encoding when character_set_client is utf8mb4

Status in oursql:
  New

Bug description:
  When setting MySQL character_set_client to "utf8mb4" to support
  reading the full range of emojiis oursql throws a lookup error:

  Traceback (most recent call last):
    File "test_utf8mb4.py", line 20, in <module>
      results = cursor.fetchone()
    File "oursqlx/cursor.pyx", line 185, in oursql.Cursor.fetchone (oursqlx/oursql.c:21389)
    File "oursqlx/util.pyx", line 47, in oursql._DictWhateverMixin.fetchone (oursqlx/oursql.c:3863)
    File "oursqlx/statement.pyx", line 496, in oursql._Statement.fetchone (oursqlx/oursql.c:14095)
  LookupError: unknown encoding: utf8mb4

  This error doesn't occur when setting character set to "utf8" or
  "latin1".

  Python 2.7.11
  oursql 0.9.3.1, 0.9.3.2
  MySQL client/server 5.6.24-72.2
  Mac OS X 10.10.5

  Test script attached using the MySQL test database. No tables
  required.

To manage notifications about this bug go to:
https://bugs.launchpad.net/oursql/+bug/1595648/+subscriptions