升级到django 1.8后,runserver在启动时挂起

时间:2015-11-04 19:42:43

标签: python django

我从1.4升级到django 1.8。升级后,runserver在没有我的应用程序的情但是当我将其中一个添加到installed_apps时,它只是在启动时挂起。 命令:

10:39:23.9166574 PM python.exe  7420    QueryDirectory  C:\Programs\Python27\Lib\site-packages\django\db\backends\logging   NO SUCH FILE    Filter: logging
10:39:23.9168061 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\db\backends\logging.pyd   NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:23.9169126 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\db\backends\logging.py    NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:23.9170179 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\db\backends\logging.pyw   NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:23.9171225 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\db\backends\logging.pyc   NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:24.0008918 PM python.exe  7420    CreateFile  C:\Programs\Python27\Lib\site-packages\django_loginas-0.1.5-py2.7.egg-info  SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
10:39:24.0009480 PM python.exe  7420    QueryBasicInformationFile   C:\Programs\Python27\Lib\site-packages\django_loginas-0.1.5-py2.7.egg-info  SUCCESS CreationTime: 3/21/2015 12:21:25 PM, LastAccessTime: 3/21/2015 12:21:26 PM, LastWriteTime: 3/21/2015 12:21:26 PM, ChangeTime: 3/21/2015 12:21:26 PM, FileAttributes: D
10:39:24.0009873 PM python.exe  7420    CloseFile   C:\Programs\Python27\Lib\site-packages\django_loginas-0.1.5-py2.7.egg-info  SUCCESS 
10:39:24.0201031 PM python.exe  7420    CreateFile  C:\programs\python27\lib\site-packages\django_loginas-0.1.5-py2.7.egg-info\namespace_packages.txt   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
10:39:24.0612018 PM python.exe  7420    CreateFile  C:\Programs\Python27\Lib\site-packages\django_loginas-0.1.5-py2.7.egg-info  SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
10:39:24.0612568 PM python.exe  7420    QueryBasicInformationFile   C:\Programs\Python27\Lib\site-packages\django_loginas-0.1.5-py2.7.egg-info  SUCCESS CreationTime: 3/21/2015 12:21:25 PM, LastAccessTime: 3/21/2015 12:21:26 PM, LastWriteTime: 3/21/2015 12:21:26 PM, ChangeTime: 3/21/2015 12:21:26 PM, FileAttributes: D
10:39:24.0612878 PM python.exe  7420    CloseFile   C:\Programs\Python27\Lib\site-packages\django_loginas-0.1.5-py2.7.egg-info  SUCCESS 
10:39:24.3178297 PM python.exe  7420    CloseFile   C:\Programs\Python27\Lib\site-packages\django\utils\log.py  SUCCESS 
10:39:24.3292991 PM python.exe  7420    QueryDirectory  C:\Programs\Python27\Lib\site-packages\django\middleware\logging    NO SUCH FILE    Filter: logging
10:39:24.3294485 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\middleware\logging.pyd    NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:24.3295557 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\middleware\logging.py NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:24.3296610 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\middleware\logging.pyw    NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:24.3297664 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\middleware\logging.pyc    NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:24.5965679 PM python.exe  7420    QueryDirectory  C:\Programs\Python27\Lib\site-packages\django\contrib\sessions\backends\logging NO SUCH FILE    Filter: logging
10:39:24.5967232 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\contrib\sessions\backends\logging.pyd NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:24.5968351 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\contrib\sessions\backends\logging.py  NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:24.5969426 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\contrib\sessions\backends\logging.pyw NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
10:39:24.5970523 PM python.exe  7420    CreateFile  C:\Programs\Python27\lib\site-packages\django\contrib\sessions\backends\logging.pyc NAME NOT FOUND  Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a

并且没有提供输出(即使我使用verbosity = 3)。 以下是为python.exe WinMerge设置procmon的屏幕截图 有没有办法调试它挂起的原因?

ecstatic

2 个答案:

答案 0 :(得分:1)

显然,这些版本之间有很多变化,所以我怀疑是否需要进行简单的更改。以下是一些使升级路径更容易的建议:

  • 尝试运行具有中间版本的应用,以查看它何时开始挂起。这可能会为您提供有关需要更改的内容的线索。此外,您应该在增加版本时开始获取弃用警告。

  • runserver_plus尝试django-extensions,可能会获得更多反馈。

  • 请查看this post有关从1.4升级到1.7的信息。

  • Herethe Open edX group目前正在将多个应用从1.4升级到1.8的过程中的一些广泛说明。

答案 1 :(得分:1)

我有这个问题。为我解决的是:

function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}

亲切的问候。