gpt4 book ai didi

python - 数据存储 : 中的属性用户已损坏

转载 作者:太空狗 更新时间:2023-10-30 01:03:42 25 4
gpt4 key购买 nike

您好,我收到一条奇怪的错误消息:Property user is corrupt in the datastore你能告诉我这意味着什么以及我应该做什么吗?这是完整的轨迹

2011-05-04 01:35:15.144

Property user is corrupt in the datastore:
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 958, in _FromPb
value = datastore_types.FromPropertyPb(prop)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore_types.py", line 1785, in FromPropertyPb
_strict_mode=False)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/users.py", line 115, in __init__
assert _auth_domain
AssertionError
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 698, in __call__
handler.get(*groups)
File "/base/data/home/apps/classifiedsmarket/dev.350122009565563926/i18n.py", line 266, in get
ads = Ad.all().filter("modified >", timeline).filter("published =", True).filter("modified <=", bookmark ).order("-modified").fetch(PAGESIZE+1)
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 2025, in fetch
raw = raw_query.Get(limit, offset, config=config)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 1504, in Get
batch = batcher.next_batch(limit)
File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_query.py", line 2220, in next_batch
batch = self.__next_batch.get_result()
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 592, in get_result
return self.__get_result_hook(self)
File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_query.py", line 1998, in __query_result_hook
self.__results = self._process_results(query_result.result_list())
File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_query.py", line 2031, in _process_results
for result in results]
File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 127, in pb_to_query_result
return self.pb_to_entity(pb)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 242, in pb_to_entity
return Entity._FromPb(pb)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 962, in _FromPb
(prop.name(), traceback.format_exc()))
Error: Property user is corrupt in the datastore:
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 958, in _FromPb
value = datastore_types.FromPropertyPb(prop)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore_types.py", line 1785, in FromPropertyPb
_strict_mode=False)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/users.py", line 115, in __init__
assert _auth_domain
AssertionError

编辑:这是我的整个模型。我没有为几个部署更改它:

class Ad(GeoModel,search.SearchableModel):   
primary_image = blobstore.BlobReferenceProperty()
ip=db.StringProperty(indexed=False,verbose_name="ip")
ipcountry=db.StringProperty(indexed=False,verbose_name="origin")
tags=db.ListProperty(db.Category)
category=db.CategoryProperty(choices=('0','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','29','30','31'),default='1',verbose_name="Category") #numeric for now
title=db.StringProperty(verbose_name="title")#required
type=db.StringProperty(choices=('w','s','r','l','b'),default='s',verbose_name="ContentType")#sell,wanted,rent,lease,buy
company_ad=db.BooleanProperty(default=False,verbose_name="company_ad")#false or nothing
user=db.UserProperty(verbose_name="userid")
facebookID=db.IntegerProperty(verbose_name="facebook id")
twitterID=db.IntegerProperty(verbose_name="twitter id")
im=db.IMProperty(verbose_name="nickname")#optional, xmpp
place=db.StringProperty()# postaladdress should work
url=db.StringProperty(verbose_name="url")
link=db.LinkProperty(verbose_name="Link")#enable
geopt=db.GeoPtProperty(verbose_name="geopt")
geohash=db.StringProperty(indexed=False,verbose_name="geocode")#should we use this?
rating=db.RatingProperty()
text=db.TextProperty(verbose_name="text")
currency=db.StringProperty(choices=('EUR','ARS','AUD','BRL','GBP','CAD','CZK','DKK','HKD','HUF','ILS','INR','JPY','MXN','NZD','NOK','PLN','PHP','SGD','SEK','SGD','CHF','USD', 'THB','TWB'),verbose_name = "Currency")
price=db.StringProperty(verbose_name="price")#floatfree, digits, decimals, regexable or integer valid8able
phonenumber=db.PhoneNumberProperty(indexed=False,verbose_name="phonenumber")#viewbit
postaladress=db.PostalAddressProperty(indexed=False,verbose_name="postaladdress")
phoneview=db.BooleanProperty(default=False,verbose_name="phoneview")#add2phone
email=db.EmailProperty(indexed=False,verbose_name="Email")#optional
name=db.StringProperty(verbose_name="Name")
#owner=db.UserProperty(verbose_name="Owner")
published=db.BooleanProperty(default=True,verbose_name="published")
#submitted=db.BooleanProperty(default=False,verbose_name="submitted")#edit
#montao=db.BooleanProperty(default=False,verbose_name="montao")#migr8
#moderated=db.BooleanProperty(default=False,verbose_name= "moderated")#edit
added=db.DateTimeProperty(verbose_name="added",auto_now_add=True)#readonly
modified=db.DateTimeProperty(verbose_name="modified",auto_now_add=True)
last_modified = db.DateTimeProperty(required=True, auto_now=True)
crypted_password=db.StringProperty()#set default true random
salt=db.StringProperty()# merge with passwrd, set default true random or why even store? counterexample
timestamp=db.DateTimeProperty(auto_now=True)#backupsystem
def __unicode__(self):
return self.title
def to_json(self):
data={}
for prop in self.properties().values():
data[prop.name] = prop.get_value_for_datastore(self)
return simplejson(data)
def __encrypt(self, plaintext, salt=""):
"""returns the SHA1 hexdigest of a plaintext and salt"""
phrase = hashlib.sha1()
phrase.update("%s--%s" % (plaintext, salt))
return phrase.hexdigest()
def set_password(self, new_password):
"""sets the user's crypted_password"""
#from datetime import datetime, timedelta
import datetime
if not self.salt:
self.salt = self.__encrypt(str(datetime.datetime.now()))
self.crypted_password = self.__encrypt(new_password, self.salt)
def check_password(self, plaintext):
return self.__encrypt(plaintext, self.salt) == self.crypted_password
def next(self):#enable
return Ad.all().filter("published =", True).filter("modified >", self.modified).get()
def prev(self):#enable
return Ad.all().filter("published =", True).filter("modified <", self.modified).get()
return levenshtein(self.text,self.prev().text)
'''
def uri2view(self):#enable get_serving_url
return images.get_serving_url(str(self.matched_images.get().primary_image.key()))+'=s100'
def kmluri2view(self):#enable get_serving_url
return self.matched_images.get()
def to_dict(self):
tempdict1 = dict([(p, unicode(getattr(self, p))) for p in self.properties()])
tempdict2 = {'key':unicode(self.key())}
tempdict1.update(tempdict2)
return tempdict1

编辑 2:通过更改变量 PAGESIZE,我可以为最新的实体加载页面。我没有找到错误开始/结束的位置:def get(self, cursor=None, limit=60, PAGESIZE = 1): 有效,我现在尝试使用更大的 PAGESIZE 即 def get(self, cursor=None, limit=60, PAGESIZE = 10):

最佳答案

这是 App Engine 数据存储区的一个已知问题。它与您的代码或应用无关。

App Engine 团队正在努力修复,在您等待期间,此处发布了一个解决方法:http://groups.google.com/forum/#!topic/google-appengine-python/ClkOIalYD3s

关于python - 数据存储 : 中的属性用户已损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5880741/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com