1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
Traceback (most recent call last):
File "/Users/web2py/gluon/restricted.py", line 209, in restricted
exec ccode in environment
File
"/Users/charlyn/web2py/source/applications/solidworks/controllers/default.py"
<http://127.0.0.1:8000/admin/edit/solidworks/controllers/default.py>, line 456,
in <module>
File "/Users/web2py/gluon/globals.py", line 186, in <lambda>
self._caller = lambda f: f()
File "/Users/web2py/gluon/tools.py", line 2832, in f
return action(*a, **b)
File
"/Users/charlyn/web2py/source/applications/solidworks/controllers/default.py"
<http://127.0.0.1:8000/admin/edit/solidworks/controllers/default.py>, line 321,
in quotation
record = db.quotations(form.vars.id)
File "/Users/web2py/gluon/dal.py", line 7664, in __call__
limitby=(0,1),for_update=for_update).first()
File "/Users/web2py/gluon/dal.py", line 8795, in select
return adapter.select(self.query,fields,attributes)
File "/Users/web2py/gluon/dal.py", line 2102, in select
return super(SQLiteAdapter, self).select(query, fields, attributes)
File "/Users/web2py/gluon/dal.py", line 1599, in select
return self._select_aux(sql,fields,attributes)
File "/Users/web2py/gluon/dal.py", line 1564, in _select_aux
self.execute(sql)
File "/Users/web2py/gluon/dal.py", line 1676, in execute
return self.log_execute(*a, **b)
File "/Users/web2py/gluon/dal.py", line 1670, in log_execute
ret = self.cursor.execute(*a, **b)
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/dbapi2.py",
line 66, in convert_timestamp
datepart, timepart = val.split(" ")
ValueError: need more than 1 value to unpack
Function argument list
(val='2012-09-27')
Code listing
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
def convert_date(val):
return datetime.date(*map(int, val.split("-")))
def convert_timestamp(val):
datepart, timepart = val.split(" ")
year, month, day = map(int, datepart.split("-"))
timepart_full = timepart.split(".")
hours, minutes, seconds = map(int, timepart_full[0].split(":"))
if len(timepart_full) == 2:
Variables timepartundefinedval.split<built-in method split of str object>
datepartundefinedval'2012-09-27'
This broke after I updated to Version 2.0.9 (2012-09-17 21:37:10) stable
It was working ok before (v2.0.8).
--