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

Bug in error reporting: string indices must be integers #1751

Closed
samthebest opened this issue Jan 27, 2016 · 9 comments
Closed

Bug in error reporting: string indices must be integers #1751

samthebest opened this issue Jan 27, 2016 · 9 comments
Assignees
Labels
guidance Question that needs advice or information.

Comments

@samthebest
Copy link

aws s3 ls s3://foo

string indices must be integers

This is a ridiculous error message, it should be "Please run aws configure"

@kyleknap
Copy link
Contributor

What version of the CLI are using? You can figure this out by running $ aws --version.

I am not able to reproduce the error message when I do not have credentials set:

$ aws --version
aws-cli/1.10.0 Python/2.7.5 Darwin/13.4.0 botocore/1.3.22
$ aws configure list
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key                <not set>             None    None
secret_key                <not set>             None    None
    region                <not set>             None    None
$ aws s3 ls
Unable to locate credentials. You can configure credentials by running "aws configure".

Let me know if that helps.

@kyleknap kyleknap self-assigned this Jan 27, 2016
@kyleknap kyleknap added question closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jan 27, 2016
@samthebest
Copy link
Author

I installed on mac with brew, then uninstalled, then pip then uninstalled then using the zip, none worked.

The zip one has version:
aws-cli/1.10.0 Python/2.7.10 Darwin/15.3.0 botocore/1.3.22

Which seems to be quite a bit later than yours.

@kyleknap
Copy link
Contributor

I do not think it is an issue with the differing python versions. It may be an issue with El Capitan. We have had a fair amount of issues coming in about issues installing the cli on El Capitan with no vitual environment: #1522.

Could you provide two bits of details to help debug this?

  1. The debug logs by running: aws s3 ls --debug
  2. How you are installing with pip. Note I would not recommend using homebrew since we do not maintain nor officially support brew as an installation method.

@samthebest
Copy link
Author

RE 2, I used easy_install method, first one on SO.

RE 1, Ok will do, but will have to revert the aws configure.

It should be pretty easy to reproduce by using VM with El Capitan.

@kyleknap
Copy link
Contributor

Thanks those debug logs will be helpful. I was searching for similar issues in the repository and I found this one: #1456. Are you retrieving credentials via assume role because it looked like the requester of the issue had problems related to configuration for assuming an iam role?

@samthebest
Copy link
Author

@kyleknap Nope, I was literally just trying s3://foo expecting to get something along the lines of "Not authorised" or "bucket does not exist".

Please could you tell me how to undo aws --configure and I'll get those debug logs to you :)

@kyleknap
Copy link
Contributor

So you can undo aws configure by either removing ~/.aws/credentials and/or ~/.aws/config depending on where your credentials are. Or you can comment your profile/credentials out with # on the lines since they are ini files.

@samthebest
Copy link
Author

@kyleknap I can't reproduce anymore! I tried resintalling inside an ubuntu:latest docker container and it gives a sensible error message. Did someone quickly fix this? Could it be I was just unlucky that the version released on that day was dodgy? Can anyone confirm?

@kyleknap kyleknap added installation and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jan 29, 2016
@kyleknap
Copy link
Contributor

Good to hear that it is working now. I have no idea why it started working. We did a release yesterday, but nothing related to installation changed. If you figure out what might have happened, we would love to hear what may have happened. Otherwise closing issue.

@diehlaws diehlaws added guidance Question that needs advice or information. and removed question labels Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants