Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sqlite 8-bit bytestrings with unicode coercion #1099

Merged
merged 4 commits into from
Dec 4, 2017
Merged

Fix sqlite 8-bit bytestrings with unicode coercion #1099

merged 4 commits into from
Dec 4, 2017

Commits on Dec 3, 2017

  1. Configuration menu
    Copy the full SHA
    728844a View commit details
    Browse the repository at this point in the history
  2. Test training with an 8-bit bytestring.

    This will cause an error in SqlAlchemy in Python 2.7
    
    ProgrammingError: (sqlite3.ProgrammingError) You must not use
    8-bit bytestrings unless you use a text_factory that can interpret
    8-bit bytestrings (like text_factory = str). It is highly
    recommended that you instead just switch your application
    to Unicode strings. [SQL: u'SELECT statement.id AS statement_id,
    statement.text AS statement_text, statement.extra_data AS
    statement_extra_data \nFROM statement \nWHERE statement.text
    = ?\n LIMIT ? OFFSET ?']
    [parameters: ('\xe4\xbd\xa0\xe5\xa5\xbd\xe5\x90\x97', 1, 0)]
    gunthercox committed Dec 3, 2017
    Configuration menu
    Copy the full SHA
    6814143 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2017

  1. Configuration menu
    Copy the full SHA
    5a527b1 View commit details
    Browse the repository at this point in the history
  2. Force unicode conversion.

    gunthercox committed Dec 4, 2017
    Configuration menu
    Copy the full SHA
    1f6a0fa View commit details
    Browse the repository at this point in the history