首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >执行syncdb时出错

执行syncdb时出错
EN

Stack Overflow用户
提问于 2011-09-29 00:35:51
回答 2查看 514关注 0票数 0

我在执行python manage.py suncdb时遇到错误

错误是

代码语言:javascript
复制
C:\Python25\lib\site-packages\django\conf\__init__.py:75: DeprecationWarning: Th
e ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
C:\Python25\lib\site-packages\django\contrib\localflavor\ca\ca_provinces.py:14:
RuntimeWarning: There have been recent changes to the CA localflavor. See the re
lease notes for details
  RuntimeWarning
Creating tables ...
Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_manager(settings)
  File "C:\Python25\lib\site-packages\django\core\management\__init__.py", line
442, in execute_manager
    utility.execute()
  File "C:\Python25\lib\site-packages\django\core\management\__init__.py", line
379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line 191,
 in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line 220,
 in execute
    output = self.handle(*args, **options)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line 351,
 in handle
    return self.handle_noargs(**options)
  File "C:\Python25\lib\site-packages\django\core\management\commands\syncdb.py"
, line 109, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive, db)
  File "C:\Python25\lib\site-packages\django\core\management\sql.py", line 189,
in emit_post_sync_signal
    interactive=interactive, db=db)
  File "C:\Python25\lib\site-packages\django\dispatch\dispatcher.py", line 172,
in send
    response = receiver(signal=self, sender=sender, **named)
  File "C:\Python25\lib\site-packages\django\contrib\contenttypes\management.py"
, line 47, in update_contenttypes
    content_type_display = '\n'.join(['    %s | %s' % (ct.app_label, ct.model) f
or ct in content_types])
AttributeError: 'unicode' object has no attribute 'app_label'

我尝试将DB以及所有的表和字段排序规则转换为utf8_general_ci,但没有任何变化

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-09-29 01:12:14

错误提示你得到了一个字符串,而不是模型元选项。它可能与排序规则无关。

在错误出现之前,您做了哪些更改?

票数 0
EN

Stack Overflow用户

发布于 2011-12-13 22:36:11

我有这个问题,我只是删除了数据库,并重新运行syncdb,它是好的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7586526

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档