码迷,mamicode.com
首页 > 数据库 > 详细

sqlalchemy.exc.CompileError: (in table 'language_label', column 'name'): VARCHAR requires a length o

时间:2019-01-21 21:13:53      阅读:405      评论:0      收藏:0      [点我收藏+]

标签:pil   lse   **kw)   lang   err   label   table   end   else   

def visit_VARCHAR(self, type_, **kw):
        if type_.length:
            return self._extend_string(
                type_, {}, "VARCHAR(%d)" % type_.length)
        else:
            raise exc.CompileError(
                "VARCHAR requires a length on dialect %s" %
                self.dialect.name)

  to

def visit_VARCHAR(self, type_, **kw):
        if type_.length is None:
            type_.length = 255
        if type_.length:
            return self._extend_string(
                type_, {}, "VARCHAR(%d)" % type_.length)
        else:
            raise exc.CompileError(
                "VARCHAR requires a length on dialect %s" %
                self.dialect.name)

  

sqlalchemy.exc.CompileError: (in table 'language_label', column 'name'): VARCHAR requires a length o

标签:pil   lse   **kw)   lang   err   label   table   end   else   

原文地址:https://www.cnblogs.com/liangliangzz/p/10300635.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!