已有183人关注
运行出错
还有0人有此问题
发表在Python图书答疑 2019-01-28 《零基础学Python》
是否精华
版块置顶:

Traceback (most recent call last):

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\urls\resolvers.py", line 535, in url_patterns

    iter(patterns)

TypeError: 'module' object is not iterable


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper

    fn(*args, **kwargs)

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run

    self.check(display_num_errors=True)

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 379, in check

    include_deployment_checks=include_deployment_checks,

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 366, in _run_checks

    return checks.run_checks(**kwargs)

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\registry.py", line 71, in run_checks

    new_errors = check(app_configs=app_configs)

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\urls.py", line 40, in check_url_namespaces_unique

    all_namespaces = _load_all_namespaces(resolver)

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\urls.py", line 67, in _load_all_namespaces

    namespaces.extend(_load_all_namespaces(pattern, current))

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\urls.py", line 57, in _load_all_namespaces

    url_patterns = getattr(resolver, 'url_patterns', [])

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\functional.py", line 37, in __get__

    res = instance.__dict__[self.name] = self.func(instance)

  File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python37\lib\site-packages\django\urls\resolvers.py", line 542, in url_patterns

    raise ImproperlyConfigured(msg.format(name=self.urlconf_name))

django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'app1.urls' from 'E:\\galaxy\\webProjects\\demo\\app1\\urls.py'>' does not appear to have any patterns in it. If you see valid patterns in

 the file then the issue is probably caused by a circular import.


分享到:
精彩评论 1
andy
学分:2118 LV10
TA的每日心情
继续努力
2017-02-06 23:42:34
2019-01-29
沙发

读者你好:

    请检查一下你的Setting.py 和 urls.py 文件的配置。参考视频教程。

首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照