Sunday, January 5, 2014

Re: Django manage.py returns ValueError: zero length field name in format

Sounds like you need 2.7 or at least 3. Check out this answer on SO http://stackoverflow.com/questions/10054122/valueerror-zero-length-field-name-in-format-python

Can't have print('Your environment is:"{}"'.format(os.environ['DJANGO_SETTINGS_MODULE']))

Should be print('Your environment is:"{0}"'.format(os.environ['DJANGO_SETTINGS_MODULE']))


On 6 January 2014 12:50, Carlos Quiros <qlands.software@gmail.com> wrote:
Hi,

I am trying to run a Django application in Python 2.6.6 Django==1.5.5 . But when I try to run

python manage.py

I get:

Traceback (most recent call last):    File "manage.py", line 12, in <module>      print('Your environment is:"{}"'.format(os.environ['DJANGO_SETTINGS_MODULE']))  ValueError: zero length field name in format

Any idea what is wrong? I am also running the same application in another server but with Python 2.7.5 and it works ok.

Note: DJANGO_SETTINGS_MODULE is an environmental variable in both systems

Thanks,

Carlos



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fc3c63a0-ff11-47cd-866f-069683af3ee6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHqTbj%3DSHAgE6p2HHEHCMSPkZX28qKXcOEX1RiwtFCxkbjo48A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate