Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python django--\uuuu init\uuuu()关键字必须是字符串_Python_Django_Web Developer Toolbar - Fatal编程技术网

Python django--\uuuu init\uuuu()关键字必须是字符串

Python django--\uuuu init\uuuu()关键字必须是字符串,python,django,web-developer-toolbar,Python,Django,Web Developer Toolbar,我试图运行python manage.py runserver,但收到以下错误。你知道我怎么修吗 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.st

我试图运行
python manage.py runserver
,但收到以下错误。你知道我怎么修吗

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
jalal@mona:/research/jalal/django/djcode/mysite$python manage.py runserver
正在验证模型。。。
由启动的线程中存在未处理的异常
回溯(最近一次呼叫最后一次):
文件“/home/jalal/.pythonbrew/pythons/pythons-2.6/lib/python2.6/site packages/django/core/management/commands/runserver.py”,第92行,在内部运行
\uuuu init\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

如何解决这个问题


谢谢。

这是由于未正确处理unicode参数而导致的。升级到Python 2.7解决了这个问题。

这是由于unicode参数处理不正确造成的。升级到Python 2.7解决了这个问题。

在opensuse linux下的Python 2.6.2也有同样的问题。然后我尝试了django 1.5.5和Ubuntu10.04以及Python2.6.5。这解决了问题


hansjh在opensuse linux下的python 2.6.2中也存在同样的问题。然后我尝试了django 1.5.5和Ubuntu10.04以及Python2.6.5。这解决了问题


hansjh

你的模型似乎有问题。你能给出你的models.py代码吗?你在运行django 1.5吗?你在使用什么版本的python?我在Python2.6中使用django 1.5。我正试图像以前一样使用pythonbrew切换到python2.7,但它说没有安装python2.7。另外,当我用sudo apt get install安装python2.7并使用它显示的python 2.6@MichaelVayvalahere是mysite文件夹中的manage.py代码时,我没有修改任何@Pixouseems的代码,就像你的模型有问题一样。你能给出你的models.py代码吗?你在运行django 1.5吗?你在使用什么版本的python?我在Python2.6中使用django 1.5。我正试图像以前一样使用pythonbrew切换到python2.7,但它说没有安装python2.7。另外,当我使用sudo apt get install安装python2.7并使用它显示的python 2.6@MichaelVayvalahere是mysite文件夹中的manage.py代码时,但是我没有修改任何内容@PixouTo更具体地说,Django 1.5所需的python最低版本是2.6.5,Django 1.5所需的Python最低版本是2.6.5。