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

kubernaut set-token fails with a traceback #27

Closed
exarkun opened this issue Jan 12, 2018 · 6 comments
Closed

kubernaut set-token fails with a traceback #27

exarkun opened this issue Jan 12, 2018 · 6 comments
Assignees

Comments

@exarkun
Copy link

exarkun commented Jan 12, 2018

I pip install kubernaut'ed (on Python 2.7; Ubuntu). When I got to the set-token step:

Traceback (most recent call last):
  File "/home/exarkun/Environments/everything/bin/kubernaut", line 11, in <module>
    sys.exit(cli())
  File "/home/exarkun/Environments/everything/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/exarkun/Environments/everything/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/exarkun/Environments/everything/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/exarkun/Environments/everything/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/exarkun/Environments/everything/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/exarkun/Environments/everything/local/lib/python2.7/site-packages/kubernaut/cli.py", line 137, in wrapper
    return func(*args, **kwargs)
  File "/home/exarkun/Environments/everything/local/lib/python2.7/site-packages/kubernaut/cli.py", line 221, in cli_set_token
    save_config(config)
  File "/home/exarkun/Environments/everything/local/lib/python2.7/site-packages/kubernaut/cli.py", line 99, in save_config
    json.dump(config_data, cf, indent=2)
  File "/usr/lib/python2.7/json/__init__.py", line 190, in dump
    fp.write(chunk)
TypeError: write() argument 1 must be unicode, not str
@alexgervais
Copy link

I get the same error. Installed with Python 3.6.4, pip 9.0.1

@plombardi89
Copy link
Contributor

@alexgervais kubernaut --version? This should be fixed in 0.1.40...

@alexgervais
Copy link

It is failing on a fresh install of kubernaut v0.1.40

@plombardi89
Copy link
Contributor

I was unable to reproduce this last night, but I was able to reproduce it this morning with python 3.6.3... digging into it now.

@plombardi89 plombardi89 self-assigned this Jan 18, 2018
plombardi89 pushed a commit that referenced this issue Jan 18, 2018
Make Kubernaut happy with Python 2 and Python 3
@plombardi89
Copy link
Contributor

plombardi89 commented Jan 18, 2018

@alexgervais I need to fix GH-31 now to get this one out officially but you can install from source with pip install -e . or pointing at the git repo.

@alexgervais
Copy link

@plombardi89 success! Thanks!

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

No branches or pull requests

3 participants