This is what I got. No fix, for now.
Say you have a datetime field. The database adapter will save it as a
TIMESTAMP sqlite type.
Now if you decide you just want the date, you don't care for the time.
You change the field to be a date col. But SQLite still use the
TIMESTAMP field type. At this point, it converts timestamp to date, as
part of what the python sqlite adapter tells it to do, and that line
has a bug, that creates the ValueError.

I have no idea how 1.98.2 can go around this. It seems more an sqlite
bug, then a web2py bug. Yet - the problem remains.
Hope someone will have a better idea what's going on here.



On Sep 21, 9:29 pm, guruyaya <guruy...@gmail.com> wrote:
> I've just D/L vcms to try. It works well on 1.98.2, but not throws an
> exception on the home page. Here's the ticket details:
>
> Traceback (most recent call last):
>   File "/home/guruyaya/web2py/gluon/restricted.py", line 194, in
> restricted
>     exec ccode in environment
>   File "/home/guruyaya/web2py/applications/blog/controllers/
> default.py", line 294, in <module>
>   File "/home/guruyaya/web2py/gluon/globals.py", line 148, in <lambda>
>     self._caller = lambda f: f()
>   File "/home/guruyaya/web2py/applications/blog/controllers/
> default.py", line 15, in index
>     all_articles = db().select(db.article.ALL,
> orderby=~db.article.date|~db.article.modified)
>   File "/home/guruyaya/web2py/gluon/dal.py", line 5697, in select
>     return self.db._adapter.select(self.query,fields,attributes)
>   File "/home/guruyaya/web2py/gluon/dal.py", line 1233, in select
>     rows = response(sql)
>   File "/home/guruyaya/web2py/gluon/dal.py", line 1223, in response
>     self.execute(sql)
>   File "/home/guruyaya/web2py/gluon/dal.py", line 1309, in execute
>     return self.log_execute(*a, **b)
>   File "/home/guruyaya/web2py/gluon/dal.py", line 1304, in log_execute
>     ret = self.cursor.execute(*a,**b)
>   File "/usr/lib/python2.7/sqlite3/dbapi2.py", line 66, in
> convert_timestamp
>     datepart, timepart = val.split(" ")
> ValueError: need more than 1 value to unpack
>
> I'll give it a deeper look later.
>
> On Sep 21, 9:04 pm, nick name <i.like.privacy....@gmail.com> wrote:
>
>
>
>
>
>
>
> > I've just done an hg pull -u:
>
> > changeset:   2435:8cbfa1244549
> > tag:         tip
> > user:        mdipie...@massimo-di-pierros-macbook-2.local
> > date:        Wed Sep 21 00:17:23 2011 -0500
> > summary:     sys.exit(0), thanks Praneeth
>
> > The "README" file mentions request.utcnow, but the code doesn't. So either
> > the README needs a fix, or some patch was lost along the way.

Reply via email to