django -- __init__() keywords must be strings

2.5k Views Asked by At

I was trying to run python manage.py runserver but I received the following errors. Do you know how I can fix it?

jalal@mona:/research/jalal/django/djcode/mysite$ python manage.py runserver

Validating models...

Unhandled exception in thread started by <bound method Command.inner_run of   <django.contrib.staticfiles.management.commands.runserver.Command object at 0x13f8ed0>>
Traceback (most recent call last):
File "/home/jalal/.pythonbrew/pythons/Python-2.6/lib/python2.6/site-packages/django/core/management/commands/runserver.py", line 92, in inner_run

__init__() keywords must be strings

How can this be fixed?

Thanks.

2

There are 2 best solutions below

1
On

This is caused by a known bug in Python 2.6 in which unicode arguments are not handled correctly. Upgrading to Python 2.7 resolves the issue.

0
On

Had the same problem with python 2.6.2 under opensuse linux. Then I tried django 1.5.5 unter Ubuntu 10.04 with python 2.6.5. This fixed the problem.

hansjh