我想安裝乾草堆與whoosh後端。當我嘗試創該指數[或任何爲此事指數命令]我收到:乾草堆/飛快移動指數生成錯誤
TypeError: Item in ``from list'' not a string
如果我完全刪除我的search_indexes.py我得到了同樣的錯誤[所以我猜它不能找到那個文件]
什麼可能會導致此錯誤?它設置爲自動發現,我確定我的應用程序已安裝,因爲我目前正在使用它。
完全回溯:
Traceback (most recent call last):
File "./manage.py", line 17, in <module>
execute_manager(settings)
File "/Users/ghostrocket/Development/Redux/.dependencies/django/core/management/__init__.py", line 362, in execute_manager
utility.execute()
File "/Users/ghostrocket/Development/Redux/.dependencies/django/core/management/__init__.py", line 303, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/ghostrocket/Development/Redux/.dependencies/django/core/management/__init__.py", line 257, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/Users/ghostrocket/Development/Redux/.dependencies/django/core/management/__init__.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/Users/ghostrocket/Development/Redux/.dependencies/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/ghostrocket/Development/Redux/.dependencies/haystack/__init__.py", line 124, in <module>
handle_registrations()
File "/Users/ghostrocket/Development/Redux/.dependencies/haystack/__init__.py", line 121, in handle_registrations
search_sites_conf = __import__(settings.HAYSTACK_SITECONF)
File "/Users/ghostrocket/Development/Redux/website/../website/search_sites.py", line 2, in <module>
haystack.autodiscover()
File "/Users/ghostrocket/Development/Redux/.dependencies/haystack/__init__.py", line 83, in autodiscover
app_path = __import__(app, {}, {}, [app.split('.')[-1]]).__path__
TypeError: Item in ``from list'' not a string
,這裏是我的search_indexes.py
from haystack import indexes
from haystack import site
from myproject.models import *
site.register(myobject)
什麼的Python和嗖嗖的版本? – Tom 2009-12-28 20:23:22
請發佈完整的回溯和search_indexes.py的內容。已發佈 – 2009-12-28 20:36:32
。謝謝!我還包括一個稍微修改過的消息。 – 2009-12-28 22:39:18