2011-08-23 42 views
0

我试图将Django注释导出到django-disqus应用中。当我运行python manage.py disqus_export --verbosity=0,我得到以下错误行:在django-disqus应用上运行disqus_export

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运行命令的工作,然而,我不知道发生了什么事。

回答

0

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

+0

是的,这正是我想知道的,但凭证是正确的。 – AAA

相关问题