私はTurboGearsを初めて使用し、仮想環境にTG2開発をインストールしました。クイックスタートガイドをフォローしていて、を介してhelloworldを正常に構築しました
paster quickstart
サーバーを起動し、Webブラウザーをlocalhost:8080に移動しました
あなたはそれを知らないでしょう、私はすぐにエラーを受け取ります、そしてドキュメントが私が見るべきであると示唆するウェルカムメッセージではありません。
エラーは次のとおりです。
AttributeError: 'AcceptLanguage' object has no attribute 'best_matches'
トレースは次のとおりです。
URL: http://localhost:8080/
File 'C:\\VirtualEnv_1\\lib\\site-packages\\weberror-0.10.3-py2.7.egg\\weberror\\evalexception.py', line 431 in respond
app_iter = self.application(environ, detect_start_response)
File 'C:\\VirtualEnv_1\\lib\\site-packages\\beaker-1.6-py2.7.egg\\beaker\\middleware.py', line 73 in __call__
return self.app(environ, start_response)
File 'C:\\VirtualEnv_1\\lib\\site-packages\\beaker-1.6-py2.7.egg\\beaker\\middleware.py', line 155 in __call__
return self.wrap_app(environ, session_start_response)
File 'C:\\VirtualEnv_1\\lib\\site-packages\\routes-1.12.3-py2.7.egg\\routes\\middleware.py', line 131 in __call__
response = self.app(environ, start_response)
File 'C:\\VirtualEnv_1\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\wsgiapp.py', line 107 in __call__
response = self.dispatch(controller, environ, start_response)
File 'C:\\VirtualEnv_1\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\wsgiapp.py', line 312 in dispatch
return controller(environ, start_response)
File 'C:\\VirtualEnv_1\\Scripts\\HelloWorld\\helloworld\\lib\\base.py', line 27 in __call__
return TGController.__call__(self, environ, start_response)
File 'C:\\VirtualEnv_1\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\controllers\\core.py', line 211 in __call__
response = self._dispatch_call()
File 'C:\\VirtualEnv_1\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\controllers\\core.py', line 162 in _dispatch_call
response = self._inspect_call(func)
File 'C:\\VirtualEnv_1\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\controllers\\core.py', line 105 in _inspect_call
result = self._perform_call(func, args)
File 'C:\\VirtualEnv_1\\lib\\site-packages\\turbogears2-2.1.3-py2.7.egg\\tg\\controllers\\dispatcher.py', line 230 in _perform_call
setup_i18n()
File 'C:\\VirtualEnv_1\\lib\\site-packages\\turbogears2-2.1.3-py2.7.egg\\tg\\i18n.py', line 61 in setup_i18n
pylons.request.accept_language.best_matches()))AttributeError:'AcceptLanguage'オブジェクトに属性'best_matches'がありません
インストール時に何かを台無しにしましたか、それともTurboGearsの問題ですか?
編集:GoodnightMoonという名前の2番目のプロジェクトを作成しましたが、今回はMakoテンプレートオプションなしで(セットアップ間の唯一の違いです)、同じエラーが発生します:
'AcceptLanguage' object has no attribute 'best_matches'
残念ながら、この質問は、このエラーに正確に関連するWeb検索で見つけることができる唯一の質問です。
この質問に答えるのを助けるために私が使用してstackoverflowに提供できる他の手がかりはありますか?
以下のMichaelPedersonのアドバイスに従って、私はi18nを調査しました。ruという名前のサブディレクトリが1つしかないi18nディレクトリがあります(ロシア語だと思います)。私は英語がデフォルトのシステムとブラウザに取り組んでいます。
この質問の時点で最新のTG2ディストリビューション、v。2.1.3、およびtg.devtools2.1.xを使用しています。