Django 1.11.7-> 2.0-> 2.2迁移-Runserver和Wall检查错误

时间:2019-09-13 04:23:12

标签: django migration django-2.2

我正在从Django 1.11.7-> 2.0-> 2.2进行迁移 我遇到了一些错误,但在解决该问题方面需要一些帮助。

这是错误输出 https://gist.github.com/axilaris/2088f3dfc281a2be6f9461d6577ca8dd

这里有一些错误摘录

$python -Wall manage.py check --settings=railercom.settings.local
....


/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap_external.py:426: ImportWarning: Not importing directory /Users/axil/Documents/project/unrealpower/unrealpower_upgrade_v2/unrealpowerenv/lib/python3.6/site-packages/ruamel: missing __init__
...
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
      return f(*args, **kwds)
    System check identified no issues (0 silenced).

$python manage.py runserver --settings=unrealpower.settings.local
....
AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'
.....

  File "/Users/megasap/Documents/project/railerdotcom/railerdotcom_upgrade_v2/railerdotcomenv/lib/python3.6/site-packages/django/utils/autoreload.py", line 124, in iter_modules_and_files
    if getattr(module, '__spec__', None) is None:
SystemError: <built-in function getattr> returned a result with an error set

1 个答案:

答案 0 :(得分:-1)

在项目的每个目录中创建一个空的__init__.py文件。