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

botocore/awscli fails to run on python 3.2 #622

Closed
sgnn7 opened this issue Aug 10, 2015 · 2 comments
Closed

botocore/awscli fails to run on python 3.2 #622

sgnn7 opened this issue Aug 10, 2015 · 2 comments

Comments

@sgnn7
Copy link

sgnn7 commented Aug 10, 2015

Python 3.2
Debian 7
boto 1.1.7 (python3 - easy_install3)
awscli 1.7.44 (python3 - easy_install3)

user@system:~$ aws s3 ls
Traceback (most recent call last):
  File "/usr/local/bin/aws", line 5, in <module>
    pkg_resources.run_script('awscli==1.7.44', 'aws')
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1236, in run_script
    exec(compile(open(script_filename).read(), script_filename, 'exec'), namespace, namespace)
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/EGG-INFO/scripts/aws", line 19, in <module>
    import awscli.clidriver
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/clidriver.py", line 25, in <module>
    from awscli.formatter import get_formatter
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/formatter.py", line 20, in <module>
    from awscli.table import MultiTable, Styler, ColorizedStyler
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/table.py", line 18, in <module>
    from awscli.compat import six
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/compat.py", line 25, in <module>
    shlex_quote = six.moves.shlex_quote
  File "/usr/local/lib/python3.2/dist-packages/botocore-1.1.7-py3.2.egg/botocore/vendored/six.py", line 89, in __get__
    result = self._resolve()
  File "/usr/local/lib/python3.2/dist-packages/botocore-1.1.7-py3.2.egg/botocore/vendored/six.py", line 154, in _resolve
    return getattr(module, self.attr)
AttributeError: 'module' object has no attribute 'quote'

Looked to be an issue in function mappings at botocore/vendored/six.py (https://github.com/boto/botocore/blob/develop/botocore/vendored/six.py#L235) with 3.2->3,3 changeover but I had more errors when I manually edited that line with other modules. Moving the awscli launcher (/usr/local/bin/aws) to use python2 fixed the use for me but this seems to be a botocore bug.

@sgnn7
Copy link
Author

sgnn7 commented Aug 10, 2015

Changing that one method mapping line to be pipes instead of shlex throws this aws error:

Traceback (most recent call last):
  File "/usr/local/bin/aws", line 5, in <module>
    pkg_resources.run_script('awscli==1.7.44', 'aws')
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1236, in run_script
    exec(compile(open(script_filename).read(), script_filename, 'exec'), namespace, namespace)
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/EGG-INFO/scripts/aws", line 27, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/EGG-INFO/scripts/aws", line 23, in main
    return awscli.clidriver.main()
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/clidriver.py", line 47, in main
    driver = create_clidriver()
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/clidriver.py", line 56, in create_clidriver
    event_hooks=emitter)
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/plugin.py", line 44, in load_plugins
    modules = _import_plugins(plugin_mapping)
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/plugin.py", line 61, in _import_plugins
    module = __import__(path, fromlist=[module])
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/handlers.py", line 54, in <module>
    from awscli.customizations.waiters import register_add_waiters
  File "/usr/local/lib/python3.2/dist-packages/awscli-1.7.44-py3.2.egg/awscli/customizations/waiters.py", line 135
    'error': u'%s is thrown ',
                            ^
SyntaxError: invalid syntax

@jamesls
Copy link
Member

jamesls commented Aug 11, 2015

Botocore doesn't support python3.2, it only support 2.6,2.7,3.3+ (https://github.com/boto/botocore/blob/develop/setup.py#L52-L57).

This is primarily because many of our dependencies (e.g requests) don't support python3.2

@jamesls jamesls closed this as completed Aug 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants