V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chouj
V2EX  ›  Project Babel

从2.3.19升级至2.5.0-dev7报错,非coder求解

  •  
  •   chouj · 2012-07-23 19:03:45 +08:00 · 5717 次点击
    这是一个创建于 4504 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Traceback (most recent call last):
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
    handler.get(*groups)
    File "/base/data/home/apps/scsers/3.360519158508612839/main.py", line 135, in get
    home_rendered = template.render(path, template_values)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/template.py", line 92, in render
    return t.render(Context(template_dict))
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/template.py", line 128, in wrap_render
    return orig_render(context)
    File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/__init__.py", line 168, in render
    return self.nodelist.render(context)
    File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/__init__.py", line 705, in render
    bits.append(self.render_node(node, context))
    File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/__init__.py", line 718, in render_node
    return(node.render(context))
    File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/defaulttags.py", line 122, in render
    nodelist.append(node.render(context))
    File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/__init__.py", line 767, in render
    output = self.filter_expression.resolve(context)
    File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/__init__.py", line 563, in resolve
    obj = resolve_variable(self.var, context)
    File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/__init__.py", line 650, in resolve_variable
    current = getattr(current, bits[0])
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 3691, in __get__
    instance = get(reference_id)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1537, in get
    return get_async(keys, **kwargs).get_result()
    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 604, in get_result
    return self.__get_result_hook(self)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1469, in __get_hook
    entities = rpc.user_data(entities)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 600, in local_extra_hook
    return extra_hook(result)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1507, in extra_hook
    model = cls1.from_entity(entity)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1442, in from_entity
    return cls(None, _from_entity=entity, **entity_values)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 974, in __init__
    prop.__set__(self, value)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 614, in __set__
    value = self.validate(value)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 3213, in validate
    value = super(IntegerProperty, self).validate(value)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 641, in validate
    raise BadValueError('Property %s is required' % self.name)
    BadValueError: Property notification_position is required
    5 条回复    1970-01-01 08:00:00 +08:00
    life
        1
    life  
       2012-07-24 16:33:37 +08:00
    请问哪里可以下载到2.5.0-dev7这个版本?
    另,2.5.0-dev7是否是支持gae的版本中最新的版本?
    非常感谢!
    chouj
        2
    chouj  
    OP
       2012-07-24 17:01:27 +08:00   ❤️ 1
    @life http://github.com/livid/v2ex zip就是
    是否支持GAE最新版就得问 @livid 了。
    guokb
        3
    guokb  
       2012-10-19 21:51:45 +08:00
    @chouj 請問LZ上面的問題有沒有解決呢?
    chouj
        4
    chouj  
    OP
       2012-10-19 22:20:05 +08:00
    @guokb 没有解决。在GAE里选择这次更新的版本号的话,依然如上报错。所以还是选回了旧版本。
    guokb
        5
    guokb  
       2012-10-20 10:56:47 +08:00
    @chouj 我是從 2.4.0-RC1 升級到 2.5.0-dev7 時出現跟妳類似的錯誤(詳見 t/50275 ), 最後2行反饋的亦是:

    raise BadValueError('Property %s is required' % self.name)
    BadValueError: Property notification_position is required

    然後,只是去瀏了下 model.pytopic.pynotifications.py 這三個文件:

    1. 在model.py中的第150-152行,有這麼一段

    raise datastore_errors.BadValueError(
    "Property %s must be convertible to a %s instance (%s)" %
    (self.name, self.data_type, value))

    2. 在topic.py中有不少帶"notification"的句子,可以去搜下......

    3. 在notifications.py中,有兩段是關於notification_position的:

    例如第55-57行

    if self.member.notifications_position != n.num:
    self.member.notifications_position = n.num
    self.member.put()

    第82-83行
    if member.notifications_position is None:
    member.notifications_position = 0

    但是,我是個代碼盲啊,不知道哪裏下手爲好,所以折騰不成功後也不了了之。

    so , 還是希望有熟悉babel且好心的童鞋們能夠提供一點兒協助吧!!thx!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   968 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:22 · PVG 05:22 · LAX 13:22 · JFK 16:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.