Giter VIP home page Giter VIP logo

Comments (7)

agronholm avatar agronholm commented on July 17, 2024

Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):


Alright then, case closed.

from sqlacodegen.

agronholm avatar agronholm commented on July 17, 2024

Original comment by Jean-Paul Calderone (Bitbucket: exarkun, GitHub: exarkun):


SQLAlchemy ticket is fixed now. I suggest this issue is now resolved, at least when using the very latest SQLAlchemy.

from sqlacodegen.

agronholm avatar agronholm commented on July 17, 2024

Original comment by Jean-Paul Calderone (Bitbucket: exarkun, GitHub: exarkun):


http://www.sqlalchemy.org/trac/ticket/2917

from sqlacodegen.

agronholm avatar agronholm commented on July 17, 2024

Original comment by Jean-Paul Calderone (Bitbucket: exarkun, GitHub: exarkun):


Okay, some more digging suggests this really is a SQLAlchemy bug, probably introduced by git rev 2692238f.

from sqlacodegen.

agronholm avatar agronholm commented on July 17, 2024

Original comment by Jean-Paul Calderone (Bitbucket: exarkun, GitHub: exarkun):


Confirmed this is still an issue with latest development version (0.9.2dev, git rev ee1f4d21037690ad996c5eacf7e1200e92f2fbaa)

from sqlacodegen.

agronholm avatar agronholm commented on July 17, 2024

Original comment by Jean-Paul Calderone (Bitbucket: exarkun, GitHub: exarkun):


Considering the exception comes out of SQLAlchemy and the strict keyword is being added by SQLAlchemy, I wonder if this is actually a SQLAlchemy bug, not a sqlacodegen bug. However, I don't know the SQLAlchemy APIs well enough to say for sure one way or the other.

from sqlacodegen.

agronholm avatar agronholm commented on July 17, 2024

Original comment by Jean-Paul Calderone (Bitbucket: exarkun, GitHub: exarkun):


Here's a more readably formatted traceback starting with reproduction instructions:

mysql> create database sqlacodegentest;
Query OK, 1 row affected (0.00 sec)

mysql> use sqlacodegentest;
Database changed
mysql> CREATE TABLE `accounttypes` (
    ->   `is_hidden` enum('false','true') NOT NULL DEFAULT 'false'
    -> ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.03 sec)

mysql> Bye
(HybridCluster)exarkun@top:~/Projects/HybridCluster/develop$ sqlacodegen mysql+pymysql://root@localhost/sqlacodegentest
Traceback (most recent call last):
  File "/home/exarkun/Environments/HybridCluster/bin/sqlacodegen", line 9, in <module>
    load_entry_point('sqlacodegen==1.1.4.post1', 'console_scripts', 'sqlacodegen')()
  File "/home/exarkun/Projects/sqlacodegen/trunk/sqlacodegen/main.py", line 40, in main
    generator = CodeGenerator(metadata, args.noindexes, args.noconstraints, args.nojoined, args.noinflect)
  File "/home/exarkun/Projects/sqlacodegen/trunk/sqlacodegen/codegen.py", line 524, in __init__
    model = ModelTable(table)
  File "/home/exarkun/Projects/sqlacodegen/trunk/sqlacodegen/codegen.py", line 209, in __init__
    column.type = column.type.adapt(cls)
  File "/home/exarkun/Environments/HybridCluster/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/base.py", line 1175, in adapt
    return sqltypes.Enum.adapt(self, impltype, **kw)
  File "/home/exarkun/Environments/HybridCluster/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py", line 1145, in adapt
    **kw
  File "/home/exarkun/Environments/HybridCluster/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py", line 1110, in __init__
    SchemaType.__init__(self, **kw)
TypeError: __init__() got an unexpected keyword argument 'strict'

from sqlacodegen.

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.