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

UnicodeDecodeError: 'ascii' codec can't decode byte #56

Open
ghost opened this issue Oct 12, 2015 · 2 comments
Open

UnicodeDecodeError: 'ascii' codec can't decode byte #56

ghost opened this issue Oct 12, 2015 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Oct 12, 2015

Hi,

I just installed SAWS on my local machine on which I already used the AWS CLI before. (Thus it should be configured correctly)
After starting SAWS I got the following output:

No resource cache found
Refreshing resources...
  Refreshing instance ids...
  Refreshing instance tags...
Traceback (most recent call last):
  File "/usr/local/bin/saws", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/saws/main.py", line 39, in cli
    saws = Saws()
  File "/usr/local/lib/python2.7/dist-packages/saws/saws.py", line 93, in __init__
    shortcut_match=self.get_shortcut_match())
  File "/usr/local/lib/python2.7/dist-packages/saws/completer.py", line 95, in __init__
    self.refresh_resources()
  File "/usr/local/lib/python2.7/dist-packages/saws/completer.py", line 133, in refresh_resources
    self.resources.refresh(force_refresh)
  File "/usr/local/lib/python2.7/dist-packages/saws/resources.py", line 149, in refresh
    self.query_instance_tag_values()
  File "/usr/local/lib/python2.7/dist-packages/saws/resources.py", line 205, in query_instance_tag_values
    self.instance_tag_values = set(output.split('\t'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9953: ordinal not in range(128)

I'm using Ubuntu 14.04 with aws --version:
aws-cli/1.8.12 Python/2.7.6 Linux/3.13.0-65-generic

@donnemartin
Copy link
Owner

@broegner nice catch, thanks for the bug report. Seems to be failing on special characters on your instance tags.

@donnemartin
Copy link
Owner

@broegner I can confirm that it's a special character issue.

For me this only seems to happen on Python 2 and not on Python 3. If you're able to run Python 3 that could be a workaround until this bug is fixed.

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

No branches or pull requests

1 participant