views:

70

answers:

1

I cannot run the dev server because of this error ("Error: cannot import name escape").

I assume its because of modifications I've done to the project, but i have no idea how to find where the error is originating from to fix it.

I don't import anything called escape anywhere.

Update

Using django-admin.py rather than the projects manage.py, don't know why...

Update 2

Now manage.py is working. This may be because I had a file called email.py which was trying to import email.mime.text (ie trying to import itself) renaming to sendemail.py solved this problem.

A: 

You are correct that it was your email.py. Deleting it will fix your problem. This is not a Windows specific problem as I had the same problem on Ubuntu.

You can duplicate this error by doing "touch email.py" or using a text editor to create an empty email.py file.

I had this same problem and your notes tipped me off. It seemed to start occurring out of nowhere. I have several pointless .py files sitting around and one of them was named email.py. It was not trying to import itself or anything. I only named it email because I was planning on emailing it to someone. I got rid of it (and the .pyc) and now everything works. I don't know what is special about email.py, but that was indeed the problem.

Conley Owens