2017-05-31 145 views
0

我正在將Django項目從MySQL遷移到PostGreSQL。將Django項目從MySQL遷移到PostgreSQL後出錯

我已經能夠成功地將數據庫從MySQL傳輸到PostGreSQL。但運行該網站給我以下錯誤:

Unhandled exception in thread started by <function wrapper at 0x7f68d9b266e0> 
Traceback (most recent call last): 
    File "/root/.virtualenvs/thakurani/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 228, in wrapper 
    _exception = sys.exc_info() 
AttributeError: 'NoneType' object has no attribute 'exc_info' 

這是錯誤,因爲一些軟件包未安裝。我已經安裝了psycopg2,python-dev,libpq-dev。

回答

0

我自己解決了錯誤。 我用:

python manage.py runserver 8000 

,而我們必須指定IP地址也即:

python manage.py runserver 0.0.0.0:8000