TypeError in date_parse.py

John Gordon gordon at panix.com
Wed Sep 11 13:09:03 EDT 2013


In <3d0038fd-00ec-4560-ab0d-06528f838026 at googlegroups.com> pestrella at 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 at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list