aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.46k stars 4.1k forks source link

upload failed #302

Closed kaihendry closed 11 years ago

kaihendry commented 11 years ago

$ aws --version aws-cli/0.16.0 Python/2.7.5 Linux/3.2.0-0.bpo.4-amd64

$ aws s3 cp 1377769736_1366x768.png s3://krkl/1377769736_1366x768.png
upload failed: 1377769736_1366x768.png to s3://krkl/1377769736_1366x768.png 'content-type'

garnaat commented 11 years ago

I haven't been able to reproduce this yet. Is this error occurring consistently? Or was a sporadic error. If you can reproduce locally, could you try running it with the --debug option? Thanks.

kaihendry commented 11 years ago

I can reproduce with any file seemingly http://s.natalian.org/2013-09-04/debug.txt

$ aws --version aws-cli/0.16.0 Python/2.7.5 Linux/3.2.0-0.bpo.4-amd64 On Archlinux btw.

I griped on Hackernews about awscli too. https://news.ycombinator.com/item?id=6325854

Thanks for your help.

garnaat commented 11 years ago

From the traceback, it looks like an issue with the requests library. What version of requests are you using?

And, yes, I noticed the griping 8^) We do appreciate the feedback. It's still version 1.0. We have a long way to go.

kaihendry commented 11 years ago

How do I tell the version of "requests"?

When I can git push to glacier, I'll be a happy bunny. Did you notice https://news.ycombinator.com/item?id=6326839 btw?

garnaat commented 11 years ago

Here's one way:

$ python
>>> import requests
>>> requests.__version__
'1.2.0'
>>> 

Yes, did see the glacier-cli link. Looks interesting.

kaihendry commented 11 years ago

1.2.3 http://sprunge.us/cSYE

garnaat commented 11 years ago

Ok, I'll do some testing with 1.2.3. Perhaps it introduces some incompatible change that we were not aware of. Thanks.

kaihendry commented 11 years ago

Is there no way of doing a "static build" of your clients? The deps are absolutely insane. We will constantly run into bugs like this.

https://news.ycombinator.com/item?id=6325701

garnaat commented 11 years ago

You can distribute your dependencies with your package. That's actually what we do on the stand-alone Windows installer. But that introduces a whole other set of problems in trying to track changes in your dependencies. Usually, by carefully constructing the dependencies in setup.py you can control this pretty well.

kaihendry commented 11 years ago

You don't mention "requests" in https://github.com/aws/aws-cli/blob/develop/setup.py btw .... ?

Can't you do the job and maintain the deps and just roll into into one dist neatly? I don't know Python very well. I know Python {1,2,3} packaging UX is a bit of a disaster.

I'm a bit perturbed about your projects high SLOC count too.

garnaat commented 11 years ago

AWS CLI depends on botocore which depends on requests. botocore is where all of the low-level request building/calling/parsing happens. We have structured it that way so we can build other packages on top of botocore.

I'm a bit perturbed about your projects high SLOC count too. - Explain?

kaihendry commented 11 years ago

So botocore isn't reigning in its deps, like "requests"? Is that what your are saying?

http://sprunge.us/HDef and IIUC, that doesn't count the 20 odd deps. This is massive.

garnaat commented 11 years ago

No, that's not what I'm saying.

kaihendry commented 11 years ago

Btw, I switched to python3 based packaging https://aur.archlinux.org/packages/python-aws-cli/ and same issue: http://sprunge.us/FXHF

garnaat commented 11 years ago

We have an explicit dependency for requests version 1.2.0 so I'm now exactly sure why your installation is using 1.2.3 but the PR listed above will fix this issue. We will get it merged and into the next release. Thanks.

jamesls commented 11 years ago

If I'm reading this right it's because the arch linux python-botocore pulls in 1.2.3? https://aur.archlinux.org/packages/python-botocore/

garnaat commented 11 years ago

That appears to be correct. So much for honoring explicit dependencies.

flaccid commented 11 years ago

Package now updated with patch from the PR's commit, https://aur.archlinux.org/packages/python-botocore/ (will be removed when fix is released). @kaihendry next time please try to comment against the correct AUR package.

garnaat commented 11 years ago

Fix has been merged to botocore.