Python Tastypie迁移错误
我正在尝试为Django安装tastypie。我还安装了South。但当我迁移时,我会遇到一些奇怪的类型错误Python Tastypie迁移错误,python,tastypie,Python,Tastypie,我正在尝试为Django安装tastypie。我还安装了South。但当我迁移时,我会遇到一些奇怪的类型错误 ./manage.py migrate tastypie Running migrations for tastypie: - Migrating forwards to 0002_add_apikey_index. > tastypie:0001_initial TypeError: type() argument 1 must be string, not unicode
./manage.py migrate tastypie
Running migrations for tastypie:
- Migrating forwards to 0002_add_apikey_index.
> tastypie:0001_initial
TypeError: type() argument 1 must be string, not unicode
我查看了迁移0002,类型甚至没有被调用 这是最新版本(
0.10.0
)中的一个bug。已提交错误报告
您可以通过安装以前的版本来修复它:
pip install django tastype==0.9.16
我也遇到了同样的问题(在0.11.0版本中),我解决了这个问题,从已安装的应用程序(settings.py)中删除了“tastype”。我在0.11.0中也遇到了同样的问题
快速修复方法是删除:
from __future__ import unicode_literals
来自迁移文件。您使用的是哪个版本的
tastype
?谢谢!我通过禁用South并运行syncdb“解决了这个问题”。@在这种情况下,您也可以使用python manage.py syncdb--all
。确保您首先迁移了所有其他应用:)与0.11.0有相同的问题。恢复到0.9.16也为我修复了它。