Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53972
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-09-11 08:04 -0700 |
| Message-ID | <09d39e02-c741-4a46-b34f-551e11118e7b@googlegroups.com> (permalink) |
| Subject | TypeError in date_parse.py |
| From | pestrella@gmail.com |
Hello, I'm running an application using python 2.7 with django 1.5 and when posting a page I get the error "TypeError" I guess it is something related to timestamps?
Below I paste part of the code I think is causing the problem and the stacktace I see
Any help is welcome, Thanks!
Paula
=============================
# Compute duration for this item.
duration = None
if end_timestamp and start_timestamp:
start_datetime = datetime.fromtimestamp(float(start_timestamp))
end_datetime = datetime.fromtimestamp(float(end_timestamp))
duration = end_datetime - start_datetime
=============================
POST
Request URL: http://127.0.0.1:8000/appraise/evaluation/7b31d05e50584d2b92b4a04d85e68ce3/
Django Version: 1.5.2
Exception Type: TypeError
Exception Value:
expected string or buffer
Exception Location: /usr/local/lib/python2.7/dist-packages/django/utils/dateparse.py in parse_time, line 50
Python Executable: /usr/bin/python
Python Version: 2.7.2
Python Path:
['../Appraise-Software/appraise',
'/home/paula/.local/lib/python2.7/site-packages/setuptools-1.1.4-py2.7.egg',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/home/paula/.local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
'/usr/lib/python2.7/dist-packages/ubuntuone-couch',
'/usr/lib/python2.7/dist-packages/ubuntuone-installer',
'/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll 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