I found a workaround to recover original data for now

1) create a new app with the .w2p file
2) replace the storage.sqlite file with the original (which has 907 records)
3) restart the web2py


However, I am curious if any web2py export may know the possible root cause

Thanks,
Wen 




On Saturday, January 16, 2016 at 3:00:50 PM UTC-5, Wen wrote:
>
> To add, I pack the app and reinstall as a new app, then storage.sqlite 
> file shows 616 records
>
>
> On Saturday, January 16, 2016 at 2:57:37 PM UTC-5, wwwgong wrote:
>>
>> Hi, web2py experts:
>> I encounter a strange issue where web2py fetches less data than what 
>> exists in sqlite database
>>
>> Here is a simple app to manage Chinese charactor 
>>
>> # model: table def.
>> db.define_table('wg_zi_shape'
>>     ,Field('zi','string',label=T('原字'))
>>     ,Field('z_upleft','string',label=T('左上'))
>>     ,Field('z_upright','string',label=T('右上'))
>>     ,Field('z_left','string',label=T('左'))
>>     ,Field('z_upper','string',label=T('上'))
>>     ,Field('z_center','string',label=T('中'))
>>     ,Field('z_lower','string',label=T('下'))
>>     ,Field('z_right','string',label=T('右'))
>>     ,Field('z_lowleft','string',label=T('左下'))
>>     ,Field('z_lowright','string',label=T('右下'))
>>     ,Field('z_front','string',label=T('前'))
>>     ,Field('z_back','string',label=T('后'))
>>     ,Field('note','string',label=T('注明'))
>>     ,singular="Form"
>>     ,plural="Forms"
>> )
>>
>> # controller : default.py
>> @auth.requires_login()
>> def zi_shape():
>>     grid = SQLFORM.smartgrid(db.wg_zi_shape,create=True
>>     ,deletable=False,formstyle='divs',paginate=50,csv=False)
>>     return locals()
>>
>> # view: default/zi_shape.html
>> {{extend 'layout.html'}}
>> {{=grid}}
>>
>>
>> I entered 907 words one-by-one using this form up to last night, 
>> Everything works without any issue.
>>
>> This morning, the view shows only 616 records
>> But using Sqlite browser, I see 907 records in storage.sqlite file
>>
>> What could cause this inconsistency? How to resolve it?
>>
>> I will share the .w2p file + the original storage.sqlite file when 
>> someone likes to debug this
>>
>> Thanks for your help
>>
>> Wen
>>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to