2016-10-18 6 views
4

サーバーの実行中に次のエラーが発生しました。私はDjango === 1.10.2とデフォルトのsqlite3データベースをバックエンドとして使用しています。しかし、私は以下の例外を持っています:私はrunserver djangoを開始するために直面​​していますか?

python manage.py runserver 
Performing system checks... 
System check identified no issues (0 silenced). 
Unhandled exception in thread started by <function wrapper at 0x7f56983c3140> 
Traceback (most recent call last): 
    File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper 
    fn(*args, **kwargs) 
    File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 124, in inner_run 
    self.check_migrations() 
    File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/core/management/base.py", line 437, in check_migrations 
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS]) 
    File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__ 
    self.loader = MigrationLoader(self.connection) 
    File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/loader.py", line 52, in __init__ 
    self.build_graph() 
    File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/loader.py", line 203, in build_graph 
    self.applied_migrations = recorder.applied_migrations() 
    File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations 
    self.ensure_schema() 
    File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 59, in ensure_schema 
    raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc) 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 6: ordinal not in range(128) 

どのような解決策がありますか?

+0

サーバーを実行する前にデータベースを移行しましたか? – Soviut

+0

私は移行できません..同じコマンドを実行すると、同じエラーが表示されます。 – nidhin

+0

データベース名に "ñ"文字がありますか?またはテーブル名ですか? – csinchok

答えて

0

おそらくdjango設定で指定されたsqliteファイルの名前のどこかに奇妙な文字が設定されているようです。

Djangoは実行しようとしませんraise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc) - これを実行すると、0xf1がASCIIの一部ではないことを示すUNICODEエラーが発生します。 this tableに基づいて、これは文字±です。 djangoはこれをテーブル名として使うのではなく、ファイル名に関連しているはずです。

これが当てはまらない場合は、grep '±' .をプロジェクトフォルダ内に入れてください。 HTH

関連する問題