求大神回复下,这个是我 redmine 账号没权限不足吗?难道要使用管理原的账号 key 才行?

代码:

redmine = redminelib.Redmine('http://red.XXXXXXXX.com/', key='XXXXXXXXX')
re = redmine.project.get('XXXXXX')
print(re)

运行报错日志:

Traceback (most recent call last):
  File "F:/code/apitest/redmin/redmin.py", line 21, in <module>
    re = redmine.project.get('livelihood')
  File "D:\tools\python\lib\site-packages\redminelib\managers\base.py", line 83, in get
    return self.to_resource(self.redmine.engine.request('get', self.url, params=self.params)[self.container])
  File "D:\tools\python\lib\site-packages\redminelib\engines\base.py", line 76, in request
    return self.process_response(self.session.request(method, url, **kwargs))
  File "D:\tools\python\lib\site-packages\redminelib\engines\base.py", line 153, in process_response
    raise exceptions.AuthError
redminelib.exceptions.AuthError: Invalid authentication details


↙↙↙阅读原文可查看相关链接,并与作者交流