Please ignore this issue, searched for all Unicode but forgot I also
used a String for a column...

It works flawlessly, I apologize.

On Feb 21, 12:40 pm, neurino <neur...@gmail.com> wrote:
> I'm switching to MySQL from SQLite in my Pylons app and I get this
> error during setup-app:
>
> sqlalchemy.exc.InvalidRequestError: VARCHAR requires a length when
> rendered on MySQL
>
> I noticed some tables had simply Unicode without length but also
> adding length to all Unicode columns the error keeps coming.
>
> CREATE TABLE views (
>         id INTEGER NOT NULL AUTO_INCREMENT,
>         name VARCHAR(40) NOT NULL,
>         `desc` VARCHAR(80),
>         PRIMARY KEY (id)
> )
>
> 21-02-11 12:18:30,086 INFO  [sqlalchemy.engine.base.Engine.0x...ff6c]
> [MainThread] ()
> 21-02-11 12:18:30,170 INFO  [sqlalchemy.engine.base.Engine.0x...ff6c]
> [MainThread] COMMIT
> Traceback (most recent call last):
> ...
>   File "...python2.6/site-packages/SQLAlchemy-0.6.6-py2.6.egg/
> sqlalchemy/dialects/mysql/base.py", line 1520, in visit_VARCHAR
>     raise exc.InvalidRequestError("VARCHAR requires a length when
> rendered on MySQL")
> sqlalchemy.exc.InvalidRequestError: VARCHAR requires a length when
> rendered on MySQL
>
> Maybe is `desc` column that's nullable?
>
> I'm using:
>  * sqlalchemy 0.6.6
>  * MySQLdb 1.2.3
>  * MySQL Ver 14.14 Distrib 5.1.41,
>
> Thanks for your support

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to