Google App Engine 1.4.0 中的 Django-OAuth-Twitter 错误 -- 意外的关键字参数:next_count、prefetch_count、offset

发布于 2024-10-06 11:31:00 字数 2045 浏览 9 评论 0原文

Google 最近将他们的 appengine sdk 更新到了 1.4.0,同时我开始在我的 devbox 和生产中看到异常。这是跟踪:

Exception in request:
Traceback (most recent call last):
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/core/handlers/base.py", line 101, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/django_oauth_twitter/views.py", line 159, in callback
    user = self._authenticate(userinfo=userinfo)
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/django_oauth_twitter/views.py", line 239, in _authenticate
    user = TwitterUser.objects.get(twitter_id=userinfo.id).user
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/db/models/manager.py", line 132, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/db/models/query.py", line 334, in get
    num = len(clone)
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/db/models/query.py", line 79, in __len__
    self._result_cache = list(self.iterator())
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/db/models/query.py", line 267, in iterator
    for row in compiler.results_iter():
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/djangoappengine/db/compiler.py", line 96, in results_iter
    next_count=75)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 1304, in Run
    config = _Rpc2Config(_GetConfigFromKwargs(kwargs))
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 169, in _GetConfigFromKwargs
    'Unexpected keyword arguments: %s' % ', '.join(args_diff))
DatabaseError: Unexpected keyword arguments: next_count, prefetch_count, offset

我猜测损坏可能与此应用程序引擎更改有关,但不确定如何修复它: https ://gist.github.com/717904

有什么想法吗?

Google recently updated their appengine sdk to 1.4.0, and at the same time I've started seeing exceptions both on my devbox and in production. Here's the trace:

Exception in request:
Traceback (most recent call last):
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/core/handlers/base.py", line 101, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/django_oauth_twitter/views.py", line 159, in callback
    user = self._authenticate(userinfo=userinfo)
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/django_oauth_twitter/views.py", line 239, in _authenticate
    user = TwitterUser.objects.get(twitter_id=userinfo.id).user
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/db/models/manager.py", line 132, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/db/models/query.py", line 334, in get
    num = len(clone)
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/db/models/query.py", line 79, in __len__
    self._result_cache = list(self.iterator())
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/django/db/models/query.py", line 267, in iterator
    for row in compiler.results_iter():
  File "/base/data/home/apps/ezcrd2/10.346707310382875890/common-apps/djangoappengine/db/compiler.py", line 96, in results_iter
    next_count=75)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 1304, in Run
    config = _Rpc2Config(_GetConfigFromKwargs(kwargs))
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 169, in _GetConfigFromKwargs
    'Unexpected keyword arguments: %s' % ', '.join(args_diff))
DatabaseError: Unexpected keyword arguments: next_count, prefetch_count, offset

I'm guessing the breakage is likely related to this appengine change, but not sure how to fix it: https://gist.github.com/717904

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千纸鹤 2024-10-13 11:31:00

啊,问题显然是我使用的是旧版本的 django-nonrel 。它与 django-oauth-twitter 无关

Ah, the problem was evidently that I was using an old version of django-nonrel. It had nothing to do with django-oauth-twitter

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文