2014-02-21 94 views
0

Django非常新 - 我試圖使用他們的指南在Webfaction上建立一個站點。 http://docs.webfaction.com/software/django/getting-started.htmlpython3.3 manage.py syncdb語法錯誤

我已經更新了settings.py的指示,但我在我的settings.py文件中出現語法錯誤。我試過了,並確保沒有標籤和空格。

這裏的錯誤消息:

python3.3 manage.py syncdb 
Traceback (most recent call last): 
File "manage.py", line 10, in <module> 
execute_from_command_line(sys.argv) 
File "/home/bstolte/webapps/mo_detector/lib/python3.3/django/core/management/__init__.py", line 399, in execute_from_command_line 
utility.execute() 
File "/home/bstolte/webapps/mo_detector/lib/python3.3/django/core/management/__init__.py", line 392, in execute 
self.fetch_command(subcommand).run_from_argv(self.argv) 
File "/home/bstolte/webapps/mo_detector/lib/python3.3/django/core/management/__init__.py", line 261, in fetch_command 
commands = get_commands() 
File "/home/bstolte/webapps/mo_detector/lib/python3.3/django/core/management/__init__.py", line 107, in get_commands 
apps = settings.INSTALLED_APPS 
File "/home/bstolte/webapps/mo_detector/lib/python3.3/django/conf/__init__.py", line 54, in __getattr__ 
self._setup(name) 
File "/home/bstolte/webapps/mo_detector/lib/python3.3/django/conf/__init__.py", line 49, in _setup 
self._wrapped = Settings(settings_module) 
File "/home/bstolte/webapps/mo_detector/lib/python3.3/django/conf/__init__.py", line 128, in __init__ 
mod = importlib.import_module(self.SETTINGS_MODULE) 
File "/usr/local/lib/python3.3/importlib/__init__.py", line 90, in import_module 
return _bootstrap._gcd_import(name[level:], package, level) 
File "<frozen importlib._bootstrap>", line 1586, in _gcd_import 
File "<frozen importlib._bootstrap>", line 1567, in _find_and_load 
File "<frozen importlib._bootstrap>", line 1534, in _find_and_load_unlocked 
File "<frozen importlib._bootstrap>", line 586, in _check_name_wrapper 
File "<frozen importlib._bootstrap>", line 1024, in load_module 
File "<frozen importlib._bootstrap>", line 1005, in load_module 
File "<frozen importlib._bootstrap>", line 562, in module_for_loader_wrapper 
File "<frozen importlib._bootstrap>", line 855, in _load_module 
File "<frozen importlib._bootstrap>", line 982, in get_code 
File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed 
File "/home/bstolte/webapps/mo_detector/mo_detector/mo_detector/settings.py", line 35 
INSTALLED_APPS = (
      ^
SyntaxError: invalid syntax 

爲什麼它的失敗在INSTALLED_APPS任何想法?

+0

你能顯示settings.py文件嗎? – karthikr

+0

有可能是'語法錯誤',也就是說,你可能會在包含'INSTALLED_APPS'的行上方缺少'bracket'或者'comma'。 – suhailvs

回答

0

通常,當您收到類似語法錯誤的錯誤信息時,您將看不到任何錯誤,這意味着文件中有一個未關閉的括號,縮進塊或其他項。 settings.py文件遵循普通的Python語法規則,就像任何其他.py文件一樣,所以在該行之前尋找可能導致解析器窒息的東西。

+0

對 - 非常感謝。我有一個未關閉的支架...呃。再次感謝。 – bstolte

相關問題