Django startproject UnicodeDecodeError

时间:2016-03-30 10:04:37

标签: python django

我正在使用ubuntu 14.04 LTS。我安装了django(最新版本,1.10)。但是当我试图运行命令django-admin startproject beta时,我遇到了问题

bisguzar@komodor64:~/Masaüstü/projeler/csgobetting$ django-admin.py startproject beta

这是我的错误跟踪:

Traceback (most recent call last):
  File "/usr/local/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/local/lib/python2.7/dist-packages/Django-1.10.dev20160327014941-py2.7.egg/django/core/management/__init__.py", line 362, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/Django-1.10.dev20160327014941-py2.7.egg/django/core/management/__init__.py", line 354, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.10.dev20160327014941-py2.7.egg/django/core/management/base.py", line 297, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.10.dev20160327014941-py2.7.egg/django/core/management/base.py", line 348, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.10.dev20160327014941-py2.7.egg/django/core/management/commands/startproject.py", line 33, in handle
    super(Command, self).handle('project', project_name, target, **options)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.10.dev20160327014941-py2.7.egg/django/core/management/templates.py", line 162, in handle
    if new_path.endswith(extensions) or filename in extra_files:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 19: ordinal not in range(128)
bisguzar@komodor64:~/Masaüstü/projeler/csgobetting$ echo $LANG
tr_TR.UTF-8
bisguzar@komodor64:~/Masaüstü/projeler/csgobetting$ 

当我用django 1.6测试starproject时,它的成功。非常感谢...

1 个答案:

答案 0 :(得分:0)

路径名中的土耳其字符(Masaüstü)是问题所在。尝试在另一个(最好是较短的)目录下创建项目,例如/var/www/projeler