Django服务器刚刚停止

时间:2019-07-17 07:30:44

标签: python django

我刚从2.0版升级到Django 2.2.3。

由于某种原因,系统只会在进入新页面时停止工作。我可能会翻一页或一页,然后服务器停止。

我也在使用Cookiecutter。

以下是我收到的典型消息。虽然改变了。

在此之前,我表现得很奇怪-为什么我要升级。

我检查了所有迁移情况。重新安装了Django。使用Pycharm。

谢谢。

[17/Jul/2019 08:26:04] "GET /account/login/ HTTP/1.1" 200 13126
[17/Jul/2019 08:26:04] "GET /static/CACHE/css/app.8e450f098f62.css HTTP/1.1" 200 323872
AttributeError: cffi library '_ffi' has no function, constant or global variable named '__spec__'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/benson/PycharmProjects/myanalysis/manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 60, in execute
    super().execute(*args, **options)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 95, in handle
    self.run(**options)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 102, in run
    autoreload.run_with_reloader(self.inner_run, **options)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 579, in run_with_reloader
    start_django(reloader, main_func, *args, **kwargs)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 564, in start_django
    reloader.run(django_main_thread)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 275, in run
    self.run_loop()
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 281, in run_loop
    next(ticker)
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 321, in tick
    state.update(self.loop_files(state, previous_timestamp))
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 328, in loop_files
    for path, mtime in self.snapshot_files():
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 348, in snapshot_files
    for file in self.watched_files():
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 241, in watched_files
    yield from iter_all_python_module_files()
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 103, in iter_all_python_module_files
    return iter_modules_and_files(modules, frozenset(_error_files))
  File "/Users/benson/PycharmProjects/myanalysis/v_env/lib/python3.6/site-packages/django/utils/autoreload.py", line 114, in iter_modules_and_files
    if not isinstance(module, ModuleType) or getattr(module, '__spec__', None) is None:
SystemError: <built-in function getattr> returned a result with an error set

0 个答案:

没有答案