Tastypie migration error
Asked Answered
F

3

7

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!

Ferry answered 10/8, 2013 at 14:13 Comment(1)
Which version of tastypie you're using?Coessential
B
12

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

Bronwyn answered 10/8, 2013 at 19:56 Comment(3)
thanks! I ended up "solving it" by disabling South and running syncdb.Ferry
@Ferry in that case you could also use python manage.py syncdb --all. Make sure that you first migrated all your other apps :)Bronwyn
had the same problem with 0.11.0. reverting to 0.9.16 fixed it for me as well.Flowage
Z
2

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

Zilpah answered 26/1, 2014 at 22:0 Comment(0)
E
1

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.

Ellery answered 24/2, 2014 at 14:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.