So it’s been a lot of fun trying to get Django to play nicely with Windows Vista. I’ve been following the Django tutorial and have run into an issue when attempting to start the development server for the first time. I entered the command ‘python manage.py runserver’ into my command window. I received a very cryptic side by side configuration error that prompted me to look at the Windows Event Viewer. Further investigation revealed the following error:
Activation context generation failed for “C:\Python\DLLs\_socket.pyd”.Error in manifest or policy file “C:\Python\DLLs\Microsoft.VC90.CRT.MANIFEST” on line 12. The value “../msvcr90.dll” of attribute “name” in element “urn:schemas-microsoft-com:asm.v1^file” is invalid.
I found the issue had to do with how the MANIFEST file, listed above, was trying to reference the msvcr90.dll file. It appears the reference was correct ‘../msvcr90.dll’, but for some reason it wasn’t finding the file, which was up one directory. As you can see from the above path the MANIFEST file lives in the Python DLLs directory. The msvcr90.dll lives in the Python root directory.
A slightly confusing side note is that a MANIFEST file with the same name also exists in the root Python directory. I’m too new to Python to know if perhaps the wrong MANIFEST file is being used or why this file would exisit in both spots.
After some failed attempts of hacking around the issue I finally caved and updated the MANIFEST file in the DLLs directory to point simply at ‘msvcr90.dll’ rather than ‘../msvcr90.dll’. Then I copied the msvcr90.dll file from the my root Python directory into the DLLs diretory where the MANIFEST file lived. That corrected the issue.