Web2py UnpicklingError

时间:2017-03-06 16:05:58

标签: web2py

我在Ubuntu中收到此web2py错误:

Traceback (most recent call last):
  File "/home/mwk/web2py/gluon/restricted.py", line 227, in restricted
    exec ccode in environment
  File "/home/mwk/web2py/applications/britamintell/models/db2.py", line 15, in <module>
    auth.signature)
  File "/home/mwk/web2py/gluon/packages/dal/pydal/base.py", line 834, in define_table
    table = self.lazy_define_table(tablename,*fields,**args)
  File "/home/mwk/web2py/gluon/packages/dal/pydal/base.py", line 873, in lazy_define_table
    polymodel=polymodel)
  File "/home/mwk/web2py/gluon/packages/dal/pydal/adapters/base.py", line 500, in create_table
    sql_fields_old = pickle.load(tfile)
UnpicklingError: invalid load key, '�'.

这是什么以及如何解决?

1 个答案:

答案 0 :(得分:0)

没有太多关于您尝试做什么的信息。但是,我想你正在尝试迁移数据库。 如果您使用MYSQL作为您的BBDD后端,您可以尝试将长度更改为&#34; length = 255&#34;在你的字符串字段上。

似乎在表/字段名称中使用了一个奇怪的字符