在django-disqus app上运行disqus_export

时间:2011-08-23 04:36:14

标签: django disqus

我正在尝试将Django评论导出到django-disqus应用程序。当我运行python manage.py disqus_export --verbosity=0时,我收到以下错误行:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/xx/webapps/xx/lib/python2.5/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/xx/webapps/xx/lib/python2.5/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/xx/webapps/xx/lib/python2.5/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/xx/webapps/xx/lib/python2.5/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/home/xx/lib/python2.5/django_disqus-0.4.1-py2.5.egg/disqus/management/commands/disqus_export.py", line 80, in handle
    forum_list = client.get_forum_list(user_api_key=settings.DISQUS_API_KEY)
  File "/home/xx/lib/python2.5/django_disqus-0.4.1-py2.5.egg/disqus/api.py", line 53, in call_method
    return self.call(attr, **kwargs)
  File "/home/xx/lib/python2.5/django_disqus-0.4.1-py2.5.egg/disqus/api.py", line 79, in call
    response = urllib2.urlopen(request)
  File "/usr/local/lib/python2.5/urllib2.py", line 124, in urlopen
    return _opener.open(url, data)
  File "/usr/local/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/usr/local/lib/python2.5/urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/lib/python2.5/urllib2.py", line 425, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.5/urllib2.py", line 506, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 400: BAD REQUEST

见这里:http://readthedocs.org/docs/django-disqus/en/latest/commands.html#disqus-export

然而, -dry-run命令有效,所以我不确定发生了什么。

1 个答案:

答案 0 :(得分:0)

如果提供了无效的凭证,

Disqus可能会返回400。我看了django-disqus已经有一段时间了,但你能确认一下你提供的任何凭证都有效吗?