A bug of webpy example code

50 views
Skip to first unread message

batma...@gmail.com

unread,
Sep 16, 2015, 4:37:47 AM9/16/15
to web.py

Hi, when i run the blog example code of webpy, http://webpy.org/src/blog/0.3 , there is an bug after i post a blog, as bellow:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
    return handle_class(cls)
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
    return tocall(*args)
  File "/root/BasicBlog/blog.py", line 28, in GET
    return render.index(posts)
  File "/usr/lib/python2.7/dist-packages/web/template.py", line 1020, in template
    return self._base(t(*a, **kw))
  File "/usr/lib/python2.7/dist-packages/web/template.py", line 881, in __call__
    return BaseTemplate.__call__(self, *a, **kw)
  File "/usr/lib/python2.7/dist-packages/web/template.py", line 808, in __call__
    return self.t(*a, **kw)
  File "templates/index.html", line 13, in __template__
  File "/usr/lib/python2.7/dist-packages/web/utils.py", line 905, in datestr
    delta = now - then
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'unicode'

My webpy version: 
root@iZ287xcvr93Z:~# aptitude show python-webpy
Package: python-webpy                    
State: installed
Automatically installed: no
Version: 1:0.37+20120626-1

My Ubuntu version: 12.04


Who can help me?
Reply all
Reply to author
Forward
0 new messages