Giter VIP home page Giter VIP logo

Comments (12)

jpmckinney avatar jpmckinney commented on August 19, 2024

Can you use pip list to share the version of agate-sql and whichever MySQL Python library is installed?

from csvkit.

Jackyto avatar Jackyto commented on August 19, 2024

Sure (I think I can see it coming)

agate 1.9.0
agate-dbf 0.2.2
agate-excel 0.4.1
agate-sql 0.7.0
MySQL-python 1.2.5

from csvkit.

jpmckinney avatar jpmckinney commented on August 19, 2024

Aha, yeah, this was fixed in agate-sql 0.7.1. You can upgrade to 0.7.2 with pip install -U agate-sql

from csvkit.

Jackyto avatar Jackyto commented on August 19, 2024

I did update but I have the following error now
TypeError: 'webauthn_callback' is an invalid keyword argument for this function
Do I need to open another issue ?

from csvkit.

jpmckinney avatar jpmckinney commented on August 19, 2024

Can you run the command with -v? I don't think anything about that keyword.

from csvkit.

Jackyto avatar Jackyto commented on August 19, 2024

Sure

Traceback (most recent call last):
  File "/home/jackyto/.local/bin/csvsql", line 8, in <module>
    sys.exit(launch_new_instance())
  File "/home/jackyto/.local/lib/python3.8/site-packages/csvkit/utilities/csvsql.py", line 255, in launch_new_instance
    utility.run()
  File "/home/jackyto/.local/lib/python3.8/site-packages/csvkit/cli.py", line 133, in run
    self.main()
  File "/home/jackyto/.local/lib/python3.8/site-packages/csvkit/utilities/csvsql.py", line 144, in main
    self.connection = engine.connect()
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3276, in connect
    return self._connection_cls(self)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
    self._dbapi_connection = engine.raw_connection()
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3300, in raw_connection
    return self.pool.connect()
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 449, in connect
    return _ConnectionFairy._checkout(self)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 712, in checkout
    rec = pool._do_get()
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 180, in _do_get
    self._dec_overflow()
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get
    return self._create_connection()
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection
    return _ConnectionRecord(self)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 674, in __init__
    self.__connect()
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 901, in __connect
    pool.logger.debug("Error on connect(): %s", e)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 643, in connect
    return dialect.connect(*cargs, **cparams)
  File "/home/jackyto/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 620, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)
  File "/home/jackyto/.local/lib/python3.8/site-packages/mysql/connector/pooling.py", line 322, in connect
    return CMySQLConnection(*args, **kwargs)
  File "/home/jackyto/.local/lib/python3.8/site-packages/mysql/connector/connection_cext.py", line 144, in __init__
    self.connect(**kwargs)
  File "/home/jackyto/.local/lib/python3.8/site-packages/mysql/connector/abstracts.py", line 1360, in connect
    self._open_connection()
  File "/home/jackyto/.local/lib/python3.8/site-packages/mysql/connector/connection_cext.py", line 327, in _open_connection
    self._cmysql.connect(**cnx_kwargs)
TypeError: 'webauthn_callback' is an invalid keyword argument for this function

I only have basic knowledge in python, I don't know how to analyze those kind of compilation errors

from csvkit.

jpmckinney avatar jpmckinney commented on August 19, 2024

Okay, and what is the full command you are running?

from csvkit.

Jackyto avatar Jackyto commented on August 19, 2024

csvsql -d ';' --db mysql+mysqlconnector://username:password@localhost:3306/database --insert --tables test --create-if-not-exists positpan.csv -v

from csvkit.

jpmckinney avatar jpmckinney commented on August 19, 2024

Oh, right, MySQL-python is ancient (last released 2014). You need to install pip install mysql-connector-python instead

from csvkit.

jpmckinney avatar jpmckinney commented on August 19, 2024

And pip uninstall MySQL-python just to be safe.

from csvkit.

Jackyto avatar Jackyto commented on August 19, 2024

Requirement already satisfied: mysql-connector-python

I removed MySQL-python but I have the same issue.

Nevertheless, I managed to make it work on my production server (those issues are on my machine). I will try to find the issue but I think it is my multiple versions of python which cause that.

Thank you again for the troubleshooting and cheers for your magnificent import tool !

Wish you the best

Pierre

from csvkit.

jpmckinney avatar jpmckinney commented on August 19, 2024

It could be that you need to upgrade pip install -U mysql-connector-python which added webauthn_callback support in 8.2.0

from csvkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.