On Tuesday, January 7, 2014 10:11:27 AM UTC-8, Akash Agrawall wrote:
>
>
>
> On Tuesday, January 7, 2014 2:11:35 AM UTC+5:30, Dave S wrote:
>>
>> On Monday, January 6, 2014 12:32:01 PM UTC-8, Akash Agrawall wrote:
>>>
>>> I am getting this error:
>>> "Need more than one value to unpack"
>>>
>>>
>> Can you tell us which line the error message is referencing?  Is there a 
>> traceback in the ticket?
>>
>> [...]
>
>  

>   File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 66, in 
> convert_timestamp
>     datepart, timepart = val.split(" ")
> ValueError: need more than 1 value to unpack
>
>  
>

The following seem to be the two places where you are dealing with dates, 
and this is the sort of message that the Python date parser gives when your 
date string being parsed doesn't match the pattern it is parsing to.

 

>  
>>
>>> *db.py:*
>>>
>>  

> db.define_table('book',
>>>                 db.Field('Name','string'),
>>>                 db.Field('Category','string',requires=IS_CATEGORYIT),
>>>                 db.Field('Quantity','integer'),
>>>                 db.Field('ISBN','string',unique=True),
>>>                 db.Field('Age_group','list:string', 
>>> requires=IS_IN_SET(['1-4','5-8','9-12','13-17'])),
>>>                 
>>> db.Field('entry_date','date',default=datetime.date.today(),requires=IS_DATE(format=('%d-%m-%Y'))),
>>>
>>  

> *view:add_book.html*
>>> {{=form1.custom.begin}}
>>> <table>
>>> <tr><td  style="width:51%">Name&nbsp;<span 
>>> style="color:red;">*</span>:</td><td> {{=form1.custom.widget.Name
>>> }}</td></tr>
>>> <tr><td> Quantity&nbsp;<span style="color:red;">*</span>:</td><td> 
>>> {{=form1.custom.widget.Quantity}}</td></tr>
>>> <tr><td  style="width:51%">Available&nbsp;<span 
>>> style="color:red;">*</span>:</td><td> 
>>> {{=form1.custom.widget.Available}}</td></tr>
>>> <tr><td  style="width:51%">ISBN&nbsp;<span style="color:red;">*</span>: 
>>> </td><td>{{=form1.custom.widget.ISBN}}</td></tr>
>>> <tr><td  style="width:51%">Entry Date&nbsp;<span 
>>> style="color:red;">*</span>: 
>>> </td><td>{{=form1.custom.widget.entry_date}}</td></tr>
>>>
>>  
 
 Good luck!

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to