0

我正在尝试将 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 命令有效,所以我不确定发生了什么。

4

1 回答 1

0

如果提供的凭据无效,Disqus 可能会返回 400。自从我查看 django-disqus 以来已经有一段时间了,但是您能确认您提供的任何凭据都是有效的吗?

于 2011-08-23T07:20:42.973 回答