为什么我把社长的第十节课的源码(fhx文件夹)直接移动到我的虚拟环境中,替换掉原来自己的fhx文件夹,一直报错,搞不懂。

为什么我把社长的第十节课登录与注册的源码(fhx文件夹)直接移动到我的虚拟环境中,替换掉原来自己的fhx文件夹,然后运行:python manage.py runserver但是一直报错,搞不懂。有没有遇到相同问题的朋友,已经解决了的。出来解答一下~

涨见识0 涨水分0

** 文章讲述的内容可能你不赞同,不喜欢,但如果觉得观点新颖,内容独到,提高了你的知识面,帮你了解了你不懂的知识和知道了突发的新闻,这样的贴,希望能点涨见识,相反,到处转载,内容无聊,雷同,毫无建树,请点涨水分!

我要评论

提交评论
每个人都有自己的看法,登录以后马上发表。还没有账号?点击这里马上注册一个账号。

当前有3条评论

  • geli :2017九月22号 22:01:44
    不知道哪里出错误




    Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x00000236D92CDAE8>
    Traceback (most recent call last):
    File "C:\Users\1\geli\lib\site-packages\django\utils\autoreload.py", line 228, in wrapper
    fn(*args, **kwargs)
    File "C:\Users\1\geli\lib\site-packages\django\core\management\commands\runserver.py", line 125, in inner_run
    self.check(display_num_errors=True)
    File "C:\Users\1\geli\lib\site-packages\django\core\management\base.py", line 359, in check
    include_deployment_checks=include_deployment_checks,
    File "C:\Users\1\geli\lib\site-packages\django\core\management\base.py", line 346, in _run_checks
    return checks.run_checks(**kwargs)
    File "C:\Users\1\geli\lib\site-packages\django\core\checks\registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
    File "C:\Users\1\geli\lib\site-packages\django\core\checks\urls.py", line 16, in check_url_config
    return check_resolver(resolver)
    File "C:\Users\1\geli\lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver
    return check_method()
    File "C:\Users\1\geli\lib\site-packages\django\urls\resolvers.py", line 254, in check
    for pattern in self.url_patterns:
    File "C:\Users\1\geli\lib\site-packages\django\utils\functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
    File "C:\Users\1\geli\lib\site-packages\django\urls\resolvers.py", line 405, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "C:\Users\1\geli\lib\site-packages\django\utils\functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
    File "C:\Users\1\geli\lib\site-packages\django\urls\resolvers.py", line 398, in urlconf_module
    return import_module(self.urlconf_name)
    File "C:\Users\1\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 985, in _gcd_import
    File "<frozen importlib._bootstrap>", line 968, in _find_and_load
    File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 697, in exec_module
    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
    File "C:\Users\1\geli\fhx\fhx\urls.py", line 18, in <module>
    from blog import views
    File "C:\Users\1\geli\fhx\blog\views.py", line 4, in <module>
    import datetime,bleach
    ImportError: No module named 'bleach'
    0 0 回复 举报
  • 繁花社长 :2017九月17号 22:08:49
    报错提示什么,根据提示做修改吧。我当时能运行,应该是没什么问题。可能你哪里针对你的环境参数没修改对
    0 0 回复 举报
    • geli :2017九月22号 22:03:59
      看不懂这个错误提示是啥意思?
      pip freeze虚拟环境下我装了:
      Django==1.11.5
      psycopg2==2.6.2
      pytz==2017.2

      Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x00000236D92CDAE8>
      Traceback (most recent call last):
      File "C:\Users\1\geli\lib\site-packages\django\utils\autoreload.py", line 228, in wrapper
      fn(*args, **kwargs)
      File "C:\Users\1\geli\lib\site-packages\django\core\management\commands\runserver.py", line 125, in inner_run
      self.check(display_num_errors=True)
      File "C:\Users\1\geli\lib\site-packages\django\core\management\base.py", line 359, in check
      include_deployment_checks=include_deployment_checks,
      File "C:\Users\1\geli\lib\site-packages\django\core\management\base.py", line 346, in _run_checks
      return checks.run_checks(**kwargs)
      File "C:\Users\1\geli\lib\site-packages\django\core\checks\registry.py", line 81, in run_checks
      new_errors = check(app_configs=app_configs)
      File "C:\Users\1\geli\lib\site-packages\django\core\checks\urls.py", line 16, in check_url_config
      return check_resolver(resolver)
      File "C:\Users\1\geli\lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver
      return check_method()
      File "C:\Users\1\geli\lib\site-packages\django\urls\resolvers.py", line 254, in check
      for pattern in self.url_patterns:
      File "C:\Users\1\geli\lib\site-packages\django\utils\functional.py", line 35, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
      File "C:\Users\1\geli\lib\site-packages\django\urls\resolvers.py", line 405, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
      File "C:\Users\1\geli\lib\site-packages\django\utils\functional.py", line 35, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
      File "C:\Users\1\geli\lib\site-packages\django\urls\resolvers.py", line 398, in urlconf_module
      return import_module(self.urlconf_name)
      File "C:\Users\1\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 985, in _gcd_import
      File "<frozen importlib._bootstrap>", line 968, in _find_and_load
      File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 697, in exec_module
      File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
      File "C:\Users\1\geli\fhx\fhx\urls.py", line 18, in <module>
      from blog import views
      File "C:\Users\1\geli\fhx\blog\views.py", line 4, in <module>
      import datetime,bleach
      ImportError: No module named 'bleach'
      0 0 回复 举报

需要登录以后才能进行刚才的操作

  • 刚才的操作,需要登录以后才能继续,如果已经有账号,请点击登录,登录以后,会自动返回到当前页面进行刚才的操作。如果还没有账号,请点击注册。