Skip to content

Mysql and Python 3.8 #390

Description

@ddofborg

I am trying to use dataset with MySQL 8.

I noticed MySQLDB is not really supported on Python3 and I found mysqlclient, which replaces MySQLDB for Python 3.

When I run the following:

import dataset
db = dataset.connect('mysql://un:pw@localhost')
db.tables()

I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dataset/venv/lib/python3.8/site-packages/dataset/database.py", line 184, in tables
    return self.inspect.get_table_names(schema=self.schema)
  File "/home/dataset/venv/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py", line 266, in get_table_names
    return self.dialect.get_table_names(
  File "<string>", line 2, in get_table_names
  File "/home/dataset/venv/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py", line 55, in cache
    ret = fn(self, con, *args, **kw)
  File "/home/dataset/venv/lib/python3.8/site-packages/sqlalchemy/dialects/mysql/base.py", line 2786, in get_table_names
    % self.identifier_preparer.quote_identifier(current_schema)
  File "/home/dataset/venv/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 5120, in quote_identifier
    + self._escape_identifier(value)
  File "/home/dataset/venv/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 5079, in _escape_identifier
    value = value.replace(self.escape_quote, self.escape_to_quote)
AttributeError: 'NoneType' object has no attribute 'replace'

I get this error for basically all commands. Any ideas what this could be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions