Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Django KeyError <class 'bytes'> in version 1.4.0rc1 #306

Copy link
Copy link
Closed
@dev-artisan

Description

@dev-artisan
Issue body actions

Hi,
Just updated my dev server to the latest version (1.4.0rc1) and my Django server crashed when trying to connect to the local MySQL DB installed on Ubuntu server v16
The error occurs in the code below from django/db/backends/mysql/base.py

def get_new_connection(self, conn_params):
        conn = Database.connect(**conn_params)
        conn.encoders[SafeText] = conn.encoders[six.text_type]
        conn.encoders[SafeBytes] = conn.encoders[bytes]
        return conn

Specifically this line
conn.encoders[SafeBytes] = conn.encoders[bytes]

I've reverted back to 1.13.14 and all is well in the world again, hope this helps
Thanks
Omar

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.