I am definitely not an expert on this, but it looks to me like you have 
some data in one of your tables that python cannot pickle.  I'm guessing 
you have some unicode characters that snuck into your db.  Can you write a 
quick python script to scan through the data in all your tables to see 
which records won't pickle?

-Jim

On Saturday, August 1, 2020 at 12:23:04 AM UTC-5, mostwanted wrote:
>
> Hey Jim, thats the traceback below:
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
>
> Traceback (most recent call last):
>   File "C:\Users\Maswabi\Desktop\WEB2PY 
> APPLICATIONS\web2py-2.20.4\gluon\restricted.py", line 219, in restricted
>     exec(ccode, environment)
>   File "C:/Users/Maswabi/Desktop/WEB2PY 
> APPLICATIONS/web2py-2.20.4/applications/wah/models/dbmanaq.py" 
> <http://127.0.0.1:8000/admin/default/edit/wah/models/dbmanaq.py>, line 54, in 
> <module>
>     format='%(product)s')
>   File "C:\Users\Maswabi\Desktop\WEB2PY 
> APPLICATIONS\web2py-2.20.4\gluon\packages\dal\pydal\base.py", line 657, in 
> define_table
>     table = self.lazy_define_table(tablename, *fields, **kwargs)
>   File "C:\Users\Maswabi\Desktop\WEB2PY 
> APPLICATIONS\web2py-2.20.4\gluon\packages\dal\pydal\base.py", line 698, in 
> lazy_define_table
>     polymodel=polymodel,
>   File "C:\Users\Maswabi\Desktop\WEB2PY 
> APPLICATIONS\web2py-2.20.4\gluon\packages\dal\pydal\adapters\base.py", line 
> 913, in create_table
>     return self.migrator.create_table(*args, **kwargs)
>   File "C:\Users\Maswabi\Desktop\WEB2PY 
> APPLICATIONS\web2py-2.20.4\gluon\packages\dal\pydal\migrator.py", line 323, 
> in create_table
>     sql_fields_old = pickle.load(tfile)
>   File "pickle.py", line 1384, in load
>   File "pickle.py", line 864, in load
> KeyError: '\x00'
>
>
> I really wanna fully understand this error & the best way to solve it 
> because I have encountered it in the past & it always became a struggle, it 
> turned into a nightmare that I started to dread it with every application i 
> developed especially standalone applications which can be affected by 
> sudden powercuts in computers without UPS or laptops with batter batteries!
>
> On Friday, July 31, 2020 at 8:12:10 PM UTC+2, Jim S wrote:
>>
>> Can you post a more complete traceback?
>>
>>
>>
>> On Friday, July 31, 2020 at 11:16:12 AM UTC-5, mostwanted wrote:
>>>
>>> Hi guys, *t*oday I encountered this error*: <type 
>>> 'exceptions.KeyError'> '\x00'*, I think it occured during shut down 
>>> because wheni rebooted my laptop it was there, in chapter 6 of the book 
>>> (fixing migrations) it says we should add* db.define_table(...., 
>>> migrate=True, fake_migrate=True) *but when I did that the error still 
>>> persists it doesnt go anywhere, I then added *migrate=False *alone in 
>>> the tables that came up in the issued TICKETS and the app was good and 
>>> running, why is this and what is the difference between 
>>> adding *db.define_table(...., migrate=True, fake_migrate=True) and *just 
>>> adding
>>>
>>> *db*
>>>
>>>
>>> *.define_table(...., migrate=True)?*Regards;
>>>
>>>
>>> Mostwanted
>>>
>>>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d0d45d54-b420-4b07-a857-367b7c2892b5o%40googlegroups.com.

Reply via email to