I'm trying to export Django comments to the django-disqus app. When I run python manage.py disqus_export --verbosity=0
, I get the following error lines:
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
See here: http://readthedocs.org/docs/django-disqus/en/latest/commands.html#disqus-export
The --dry-run command works, however, so I'm not sure what's going on.
Disqus may return a 400 if invalid credentials are provided. It's been a while since I've looked at django-disqus, but can you confirm that whatever credentials you've supplied are valid?
精彩评论