This project has moved and is read-only. For the latest updates, please go here.

Can't start Django application


I am trying to start debug or normal server from Visual Studio but every time I get the message:
Traceback (most recent call last):
File "C:\Programiranje\race_central\race_central\", line 8, in <module> from import execute_from_command_line File "C:\Programiranje\race_central\race_central\venv\lib\site-packages\django\core\", line 7, in <module> from django.core.exceptions import ImproperlyConfigured
File "C:\Programiranje\race_central\race_central\venv\lib\site-packages\django\core\", line 7, in <module> from django.utils.encoding import force_text
File "C:\Programiranje\race_central\race_central\venv\lib\site-packages\django\utils\", line 11, in <module> from django.utils.six.moves.urllib.parse import quote ImportError: cannot import name Quote Press any key to continue . . .
When I try to start the server from the command prompt - the usual one - development Django server everything works fine. That would be OK if I had debug possibility. Any clue how could I overcome this issue?

Visual Studio 2013 Web Express
PTVS 2.1 Beta
Windows 8.1 Professional
Python 2.7.8.
Virtual Environment

requirements.txt is in the attachment.

file attachments


pminaev wrote Jul 15, 2014 at 6:00 PM

Looking at Django code, it sounds like this is what you'd get if it would confuse the version of the interpreter it is running on. Is your virtual env showing up as "Python 2.7" in VS?

boskicthebrain wrote Jul 15, 2014 at 11:46 PM

You were right. I had two python instalations: x86 and x64. In the end I removed both of them and tried to install a brand new, single Python 3.4 just for hell of it. I didn't see any funny syptoms as before, but when I tried to install the requirements.txt output window said that all packages (other then psycopg2) installed successfully , but the environment didn't add any of the packages. I had to install them manually (right click, add python package, write the package name - use pip, install), but that's a whole new issue.

Should I report a new one for that?

Zooba wrote Aug 4, 2014 at 11:45 PM

We're already aware that pip will only install packages if all of them succeed, and there's nothing we can do about it.

I'm sure the pip developers are aware too, but there's more value in reporting it to them as a vote towards changing it.