Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tastypie migration error

I'm trying to install tastypie for Django. I also have South installed. But when I migrate I get some weird type error.

./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

I looked into the migration 0002 and type isn't even being called!

like image 839
Mark Avatar asked Aug 10 '13 14:08

Mark


3 Answers

It's a bug in the latest version (0.10.0). A bug report has been submitted. https://github.com/toastdriven/django-tastypie/issues/1005.

You can fix it by installing a previous version:

pip install django-tastypie==0.9.16

like image 127
Gert Avatar answered Oct 02 '22 18:10

Gert


I had the same issue (in the 0.11.0 version) and I solved it removing 'tastypie' from INSTALLED_APPS (settings.py).

like image 37
ecolell Avatar answered Oct 02 '22 19:10

ecolell


I had the same problem with 0.11.0.

A quick dirty fix is to remove:

from __future__ import unicode_literals

from the migration files.

like image 28
ezequielc Avatar answered Oct 02 '22 19:10

ezequielc