Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #53979

Re: TypeError in date_parse.py

From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: TypeError in date_parse.py
Date 2013-09-11 17:09 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <l0q83f$l1f$1@reader1.panix.com> (permalink)
References <09d39e02-c741-4a46-b34f-551e11118e7b@googlegroups.com> <l0q4u5$i1t$1@reader1.panix.com> <3d0038fd-00ec-4560-ab0d-06528f838026@googlegroups.com>

Show all headers | View raw


In <3d0038fd-00ec-4560-ab0d-06528f838026@googlegroups.com> pestrella@gmail.com writes:

> I think it's a float, I see in the code 

> if request.method == "POST":
>         end_timestamp = request.POST.get('end_timestamp', None)
>         start_timestamp = request.POST.get('start_timestamp', None)

> and in the debug of django 

> <QueryDict: {u'start_timestamp': [u'1378918630.398'],

That's a list, containing a string.  float() expects a single item, not a
list.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

TypeError in date_parse.py pestrella@gmail.com - 2013-09-11 08:04 -0700
  Re: TypeError in date_parse.py John Gordon <gordon@panix.com> - 2013-09-11 16:15 +0000
    Re: TypeError in date_parse.py pestrella@gmail.com - 2013-09-11 10:02 -0700
      Re: TypeError in date_parse.py John Gordon <gordon@panix.com> - 2013-09-11 17:09 +0000

csiph-web