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

TypeError: 'map' object is not subscriptable #23

Closed
sardaukar opened this issue Jul 25, 2017 · 7 comments
Closed

TypeError: 'map' object is not subscriptable #23

sardaukar opened this issue Jul 25, 2017 · 7 comments

Comments

@sardaukar
Copy link

After install awscurl on macOS Sierra, I get:

Traceback (most recent call last):
  File "/usr/local/bin/awscurl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/awscurl/awscurl.py", line 311, in main
    args.security_token
  File "/usr/local/lib/python3.6/site-packages/awscurl/awscurl.py", line 140, in make_request
    canonical_querystring = normalize_query_string(query)
  File "/usr/local/lib/python3.6/site-packages/awscurl/awscurl.py", line 227, in normalize_query_string
    for p in sorted(kv))
  File "/usr/local/lib/python3.6/site-packages/awscurl/awscurl.py", line 227, in <genexpr>
    for p in sorted(kv))
TypeError: 'map' object is not subscriptable

Is there a way to fix it? Thanks.

@okigan
Copy link
Owner

okigan commented Jul 25, 2017 via email

@okigan
Copy link
Owner

okigan commented Jul 25, 2017

@sardaukar try latest version (just published) https://pypi.python.org/pypi/awscurl/0.9

use pip uninstall awscurl folllowed by pip install awscurl

@sardaukar
Copy link
Author

Just did, still have the same issue:

Collecting awscurl
Requirement already satisfied: configargparse in /usr/local/lib/python3.6/site-packages (from awscurl)
Requirement already satisfied: urllib3[secure] in /usr/local/lib/python3.6/site-packages (from awscurl)
Requirement already satisfied: requests in /usr/local/lib/python3.6/site-packages (from awscurl)
Requirement already satisfied: configparser in /usr/local/lib/python3.6/site-packages (from awscurl)
Requirement already satisfied: certifi; extra == "secure" in /usr/local/lib/python3.6/site-packages (from urllib3[secure]->awscurl)
Requirement already satisfied: idna<2.6,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests->awscurl)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests->awscurl)
Installing collected packages: awscurl
Successfully installed awscurl-0.9
Traceback (most recent call last):
  File "/usr/local/bin/awscurl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/awscurl/awscurl.py", line 324, in main
    args.security_token or args.session_token
  File "/usr/local/lib/python3.6/site-packages/awscurl/awscurl.py", line 143, in make_request
    canonical_querystring = normalize_query_string(query)
  File "/usr/local/lib/python3.6/site-packages/awscurl/awscurl.py", line 236, in normalize_query_string
    for p in sorted(kv))
  File "/usr/local/lib/python3.6/site-packages/awscurl/awscurl.py", line 236, in <genexpr>
    for p in sorted(kv))
TypeError: 'map' object is not subscriptable

@okigan
Copy link
Owner

okigan commented Jul 26, 2017 via email

@sardaukar
Copy link
Author

awscurl --region eu-west-1 --service es --profile search "https://<some_elastic_search_host>/_cat/indices?v"

@okigan
Copy link
Owner

okigan commented Jul 27, 2017

@sardaukar another update -- try latest version (just published) https://pypi.python.org/pypi/awscurl/0.10

use pip uninstall awscurl folllowed by pip install awscurl

@sardaukar
Copy link
Author

Yep, works now! Thanks :D

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