How do I resolve Linode-CLI configuration issue to use object storage?
First, we need a Personal Access Token. To get one, please visit
https://cloud.linode.com/profile/tokens and click
"Create a Personal Access Token". The CLI needs access to everything
on your account to work correctly.
Personal Access Token: XXXXXXXXXXXXXXXXXXXXXXXXX
Traceback (most recent call last):
File "/usr/local/bin/linode-cli", line 7, in <module>
from linodecli import main
File "/usr/local/lib/python3.4/dist-packages/linodecli/init__.py", line 32,>
cli = CLI(VERSION, BASE_URL, skip_config=skip_config)
File "/usr/local/lib/python3.4/dist-packages/linodecli/cli.py", line 40, in
self.config = CLIConfig(self.base_url, skip_config=skip_config)
File "/usr/local/lib/python3.4/dist-packages/linodecli/configuration.py", lin_
self.configure()
File "/usr/local/lib/python3.4/dist-packages/linodecli/configuration.py", line
username, config['token'] = self.get_token_terminal()
File "/usr/local/lib/python3.4/dist-packages/linodecli/configuration.py", linl
username = self._username_for_token(token)
File "/usr/local/lib/python3.4/dist-packages/linodecli/configuration.py", linn
u = self._do_get_request('/profile', token=token, exit_on_error=False)
File "/usr/local/lib/python3.4/dist-packages/linodecli/configuration.py", lint
return self._do_request(requests.get, url, token=token, exit_on_error=exit)
File "/usr/local/lib/python3.4/dist-packages/linodecli/configuration.py", lint
result = method(self.base_url+url, headers=headers, json=body)
File "/usr/lib/python3/dist-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
TypeError: request() got an unexpected keyword argument 'json'</module>
1 Reply
To begin - in the output that you shared, you included the personal access token. I've scrubbed that from your post, though I highly recommend revoking that and creating a new one.
Based on the output that you provided, this seems to point to an internal python configuration issue in your system. Finding this post online, this was fixed by the person running:
pip3 install requests --upgrade
After running that, you should be able to use linode-cli just fine, though you may need to reconfigure your setup if some things got out of synch with your last attempt. For that, you can run:
linode-cli configure