Back again and confused again.
After a month or two not accessing Xanadu, I programmatically refreshed the access token and on my Linux system the ~/.config/xanadu-cloud/.env
file was updated.
But the xcc.commands.ping()
test thereafter fails with
$ python
Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import xcc.commands
>>> xcc.commands.ping()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jwoehr/work/Xanadu/xanadu_venv/lib/python3.10/site-packages/xcc/commands.py", line 311, in ping
connection.ping()
File "/home/jwoehr/work/Xanadu/xanadu_venv/lib/python3.10/site-packages/xcc/connection.py", line 211, in ping
return self.request(method="GET", path="/healthz")
File "/home/jwoehr/work/Xanadu/xanadu_venv/lib/python3.10/site-packages/xcc/connection.py", line 241, in request
self.update_access_token()
File "/home/jwoehr/work/Xanadu/xanadu_venv/lib/python3.10/site-packages/xcc/connection.py", line 313, in update_access_token
raise requests.exceptions.HTTPError(
requests.exceptions.HTTPError: Refresh token (e.g., Xanadu Cloud API key) is invalid
>>>