1

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.

Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
  • seems like there is an issue with your models. Could you give your models.py code ? – Pixou Aug 20 '13 at 17:40
  • Are you running django 1.5 ? – karthikr Aug 20 '13 at 17:45
  • what version of python are you using? – Michael Aug 20 '13 at 17:45
  • I am using django 1.5 with Python 2.6. I am trying to switch to Python 2.7 with pythonbrew like I used to do before but it says python2.7 is not installed. Also when I install python2.7 with sudo apt-get install and use which python it shows 2.6 @MichaelVayvala – Mona Jalal Aug 20 '13 at 18:47
  • here is the manage.py code in mysite folder however I didn't modify anything http://paste.ofcode.org/37LERTC2csTGBNyCJM42iLk @Pixou – Mona Jalal Aug 20 '13 at 18:49

2 Answers2

4

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.

Michael
  • 15,386
  • 36
  • 94
  • 143
0

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

hansjh
  • 1