donnemartin / saws

A supercharged AWS command line interface (CLI).
Other
5.23k stars 280 forks source link

Problems running saws after installation Mac El Capt. #94

Closed Roggus-zz closed 8 years ago

Roggus-zz commented 8 years ago

I used the Mac recommeded installation command sudo pip install saws --upgrade --ignore-installed six

restarted iTerm and type saws got this error.

➜  ~ saws
Traceback (most recent call last):
  File "/usr/local/bin/saws", line 9, in <module>
    load_entry_point('saws==0.4.1', 'console_scripts', 'saws')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/Library/Python/2.7/site-packages/saws/main.py", line 20, in <module>
    from .saws import Saws
  File "/Library/Python/2.7/site-packages/saws/saws.py", line 36, in <module>
    from awscli import completer as awscli_completer
  File "/Library/Python/2.7/site-packages/awscli/completer.py", line 12, in <module>
    import awscli.clidriver
  File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 32, in <module>
    from awscli.help import ProviderHelpCommand
  File "/Library/Python/2.7/site-packages/awscli/help.py", line 20, in <module>
    from docutils.core import publish_string
  File "/Library/Python/2.7/site-packages/docutils/core.py", line 20, in <module>
    from docutils import frontend, io, utils, readers, writers
  File "/Library/Python/2.7/site-packages/docutils/frontend.py", line 41, in <module>
    import docutils.utils
  File "/Library/Python/2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io
  File "/Library/Python/2.7/site-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/Library/Python/2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
➜  ~

Please help me piont me to the right solution if any? Probable local issue?

donnemartin commented 8 years ago

Hi @Roggus,

Can you post the output of:

 $ pip freeze

The issue looks like it's coming from aws-cli, are you able to run commands with just the aws-cli?

 $ aws s3 ls
Roggus-zz commented 8 years ago
$ pip freeze

altgraph==0.10.2
awscli==1.10.49
bdist-mpkg==0.5.0
bonjour-py==0.3
botocore==1.4.39
click==6.6
colorama==0.3.7
configobj==5.0.6
docutils==0.12
enum34==1.1.6
futures==3.0.5
jmespath==0.9.0
macholib==1.5.1
matplotlib==1.3.1
modulegraph==0.10.4
numpy==1.8.0rc1
prompt-toolkit==1.0.3
py2app==0.7.3
pyasn1==0.1.9
Pygments==2.1.3
pyobjc-core==2.5.1
pyobjc-framework-Accounts==2.5.1
pyobjc-framework-AddressBook==2.5.1
pyobjc-framework-AppleScriptKit==2.5.1
pyobjc-framework-AppleScriptObjC==2.5.1
pyobjc-framework-Automator==2.5.1
pyobjc-framework-CFNetwork==2.5.1
pyobjc-framework-Cocoa==2.5.1
pyobjc-framework-Collaboration==2.5.1
pyobjc-framework-CoreData==2.5.1
pyobjc-framework-CoreLocation==2.5.1
pyobjc-framework-CoreText==2.5.1
pyobjc-framework-DictionaryServices==2.5.1
pyobjc-framework-EventKit==2.5.1
pyobjc-framework-ExceptionHandling==2.5.1
pyobjc-framework-FSEvents==2.5.1
pyobjc-framework-InputMethodKit==2.5.1
pyobjc-framework-InstallerPlugins==2.5.1
pyobjc-framework-InstantMessage==2.5.1
pyobjc-framework-LatentSemanticMapping==2.5.1
pyobjc-framework-LaunchServices==2.5.1
pyobjc-framework-Message==2.5.1
pyobjc-framework-OpenDirectory==2.5.1
pyobjc-framework-PreferencePanes==2.5.1
pyobjc-framework-PubSub==2.5.1
pyobjc-framework-QTKit==2.5.1
pyobjc-framework-Quartz==2.5.1
pyobjc-framework-ScreenSaver==2.5.1
pyobjc-framework-ScriptingBridge==2.5.1
pyobjc-framework-SearchKit==2.5.1
pyobjc-framework-ServiceManagement==2.5.1
pyobjc-framework-Social==2.5.1
pyobjc-framework-SyncServices==2.5.1
pyobjc-framework-SystemConfiguration==2.5.1
pyobjc-framework-WebKit==2.5.1
pyOpenSSL==0.13.1
pyparsing==2.0.1
python-dateutil==1.5
pytz==2013.7
rsa==3.4.2
s3transfer==0.0.1
saws==0.4.1
scipy==0.13.0b1
six==1.4.1
vboxapi==1.0
wcwidth==0.1.7
xattr==0.6.4
zope.interface==4.1.1

Any hints from this output?

aws s3 ls works fine, i get a listing of my buckets. The error message ValueError: unknown locale: UTF-8 seems odd as well, UTF-8 feels pretty common, it must be something else as i understand.

donnemartin commented 8 years ago

This Stack Overflow post seems very similar.

Does this answer help?

Roggus-zz commented 8 years ago

Definitivle help. It was local issue, or as a read a current bug that is to be fixed. Adding

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

to my .zshrc or .bash if one uses that did the trick.

I'm so happy to be using this easy and fast add-on for aws-cli. Thx for the help @donnemartin

donnemartin commented 8 years ago

Great! Happy to hear you're up and running.