Help resolve AWS error

136 views
Skip to first unread message

Vidhan Agarwal

unread,
May 23, 2016, 6:32:29 AM5/23/16
to Capistrano
set :env_path, 's3api get-object --bucket <<BUCKET_NAME>> --key <<ENV_FILE>> <<ENV_FILE>>'


  6         desc "Get .env file"
  7         task :download_configs do
  8                 on roles(:all) do
  9                         within release_path do
 10                                 execute :aws, "#{fetch(:env_path)}"
 11                         end
 12                 end
 13                # on roles(:db) do
 14                #        within release_path do
 15                #                execute :aws, "#{fetch(:env_path)}"
 16                #        end
 17                # end
 18         end


Error:-

cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as ubu...@54.213.226.117: aws exit status: 1
aws stdout: Traceback (most recent call last):
  File "/usr/bin/aws", line 15, in <module>
    import awscli.clidriver
  File "/usr/share/awscli/awscli/clidriver.py", line 30, in <module>
    from awscli.help import ProviderHelpCommand
  File "/usr/share/awscli/awscli/help.py", line 20, in <module>
    from docutils.core import publish_string
  File "/usr/lib/python3/dist-packages/docutils/core.py", line 20, in <module>
    from docutils import frontend, io, utils, readers, writers
  File "/usr/lib/python3/dist-packages/docutils/frontend.py", line 41, in <module>
    import docutils.utils
  File "/usr/lib/python3/dist-packages/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io
  File "/usr/lib/python3/dist-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/usr/lib/python3/dist-packages/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/usr/lib/python3.4/locale.py", line 556, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python3.4/locale.py", line 484, in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
aws stderr: Nothing written

SSHKit::Command::Failed: aws exit status: 1
aws stdout: Traceback (most recent call last):
  File "/usr/bin/aws", line 15, in <module>
    import awscli.clidriver
  File "/usr/share/awscli/awscli/clidriver.py", line 30, in <module>
    from awscli.help import ProviderHelpCommand
  File "/usr/share/awscli/awscli/help.py", line 20, in <module>
    from docutils.core import publish_string
  File "/usr/lib/python3/dist-packages/docutils/core.py", line 20, in <module>
    from docutils import frontend, io, utils, readers, writers
  File "/usr/lib/python3/dist-packages/docutils/frontend.py", line 41, in <module>
    import docutils.utils
  File "/usr/lib/python3/dist-packages/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io
  File "/usr/lib/python3/dist-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/usr/lib/python3/dist-packages/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/usr/lib/python3.4/locale.py", line 556, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python3.4/locale.py", line 484, in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
aws stderr: Nothing written

Lee Hambley

unread,
May 23, 2016, 6:35:36 AM5/23/16
to Capistrano
There appears to be an error in the Python code of the AWS tools, this doesn't look like a Capistrano issue, it looks like missing Python imports!

Unfortunately I'm not a python developer so I can't really read the backtraces, I'd suggest though a decent place to start seeing if this is related to the way Capistrano sets up the connection, or not by looking at this entry in our FAQ:


Cheers,


--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/1ffbe250-3601-4d2e-af86-2345b52251fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages