Python 2.7.13とDjango 1.11.4がインストールされました。 myprojectというプロジェクトを作成し、以下のコマンドで開始しようとしましたが、UnicodeDecodeErrorエラーがスローされます。UnicodeDecodeError序数が範囲外(128)
python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
Unhandled exception in thread started by <function wrapper at 0x7f13229f10c8>
Traceback (most recent call last):
File "/opt/IBM/Python2.6/lib/python2.7/site-packages/django/utils/autoreload.py", line 228, in wrapper
fn(*args, **kwargs)
File "/opt/IBM/Python2.6/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 128, in inner_run
self.check_migrations()
File "/opt/IBM/Python2.6/lib/python2.7/site-packages/django/core/management/base.py", line 422, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "/opt/IBM/Python2.6/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__
self.loader = MigrationLoader(self.connection)
File "/opt/IBM/Python2.6/lib/python2.7/site-packages/django/db/migrations/loader.py", line 52, in __init__
self.build_graph()
File "/opt/IBM/Python2.6/lib/python2.7/site-packages/django/db/migrations/loader.py", line 209, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/opt/IBM/Python2.6/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
self.ensure_schema()
File "/opt/IBM/Python2.6/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)
これ以外の設定は行っていませんが、開発サーバーを起動しようとしましたが失敗しました。
設定に関連するデータベース設定を含めてください。あなたはどこかに非ASCIIデータベース関連の名前があるようです。 –
初めて起動した方は、Python3に切り替えてください – WombatPM
Thanks Pieters!データベース構成の設定方法を教えてください...私はどのファイルですか? @WombatPM私はpymqiモジュールを使用する予定です..... Python3はpymqiモジュールをサポートしていません – user3171821