Thank you, I deleted the file, and changed the db.define_table like this:
db.define_table('NFobj',
...,
migrate = False, fake_migrate = True
)
As long as I leave these settings like this, everything works.
I wonder is there any case or an action witch I will not be able to
accomplish in the future due to these settings?
I am not so experienced with web2py. I haven't tried to do the database
migration, but what If want to do the database migration in the future?
Does the migrate=False setting restricts web2py to do the migration?
On Monday, October 21, 2013 1:50:12 AM UTC+3, Massimo Di Pierro wrote:
>
> Have you tried?
>
> remove the databses/....._NFobj.table and change
>
> db.define_table('NFobj',
>
> fake_migrate=True,
> )
>
>
> On Sunday, 20 October 2013 15:16:39 UTC-5, Kalvis Bruns wrote:
>>
>> I have a problem with my db tables definition. In db.py file there seems
>> to be a problem with the table with name "NFCobj". I get the "<class
>> 'cPickle.UnpicklingError'> pickle data was truncated" error If I have the
>> db.define_table command, with table name "NFCobj" like this:
>>
>> #NFCobj table
>> db.define_table('NFCobj',
>> Field('name','string',required=True),
>> Field('href','string', required=True),
>> Field('active','boolean'),
>> format='%(name)s'
>> )
>>
>> when I change the name to for example "NFobj", everything is OK:
>>
>> #NFCobj table
>> db.define_table('NFobj',
>> Field('name','string',required=True),
>> Field('href','string', required=True),
>> Field('active','boolean'),
>> format='%(name)s'
>> )
>>
>>
>> Below You can see a more datailed error description:
>> <class 'cPickle.UnpicklingError'> pickle data was
>> truncatedVersionweb2py™Version
>> 2.7.4-stable+timestamp.2013.10.14.15.16.29PythonPython 2.7.5:
>> D:\programming\python\web2py\web2py.exe (prefix:
>> D:\programming\python\web2py)Traceback
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>>
>> Traceback (most recent call last):
>> File "/home/mdipierro/make_web2py/web2py/gluon/restricted.py", line 217,
>> in restricted
>> File "D:/programming/python/web2py/applications/linkNFC/models/db.py"
>> <http://127.0.0.1:8008/admin/default/edit/linkNFC/models/db.py>, line 26, in
>> <module>
>> File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 7935, in
>> define_table
>> File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 7972, in
>> lazy_define_table
>> File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 1020, in
>> create_table
>> UnpicklingError: pickle data was truncated
>>
>>
>> I have already tried to delete all web2py directory, and reinstall a new
>> fresh installation, got the last working version of the application from
>> the bitbucket, still cant solve this issue.
>>
>> It seems that there are some temp data or something else left somewhere
>> on the local PC where I'm testing this application. Tommorrow I will try to
>> run the same application from different computer. I predict that I won't be
>> able to repeat this issue on fifferent PC.
>>
>> Please can somebody help me resolve this issue?
>>
>
--
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/groups/opt_out.