Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError when refreshing token #68

Open
dylanlingelbach opened this issue May 10, 2016 · 0 comments
Open

ValueError when refreshing token #68

dylanlingelbach opened this issue May 10, 2016 · 0 comments

Comments

@dylanlingelbach
Copy link

When base.py tries to refresh a token upon a 401 error, a ValueError is raised because the syntax for log message format is incorrect.

Line 181 should read:

self.log.info('Retrying with new token %s' % (self.access_token))

not

self.log.info('Retrying with new token %' % (self.access_token))

The stack trace for the error is:

Traceback (most recent call last):
  <Our code elided>
  File "/Users/dylanl/Code/core/core-env/src/hapipy-master/hapi/workflows.py", line 34, in enroll_contact
  File "/Users/dylanl/Code/core/core-env/src/hapipy-master/hapi/base.py", line 209, in _call
    result = self._call_raw(subpath, params=params, method=method, data=data, doseq=doseq, query=query, retried=False, **options)
  File "/Users/dylanl/Code/core/core-env/src/hapipy-master/hapi/base.py", line 182, in _call_raw
    self.log.info('Retrying with new token %' % (self.access_token))
ValueError: incomplete format

I can create a PR if needed. My fork has a few other changes that aren't ready to merge and the change is so trivial I figured a PR would be overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant