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

verbose flag causing error with traceback #48

Closed
jwarchol opened this issue May 17, 2012 · 7 comments
Closed

verbose flag causing error with traceback #48

jwarchol opened this issue May 17, 2012 · 7 comments
Labels
bug Something isn't working

Comments

@jwarchol
Copy link

While trying to debug a server issue today I used the verbose flag for the first time. That resulted in the following traceback:


$ http -v get http://jsonip.com/
Traceback (most recent call last):
  File "/usr/local/bin/http", line 8, in <module>
    load_entry_point('httpie==0.2.0', 'console_scripts', 'http')()
  File "/Library/Python/2.7/site-packages/httpie/__main__.py", line 115, in main
    output = _get_output(args, stdout_isatty, response)
  File "/Library/Python/2.7/site-packages/httpie/__main__.py", line 89, in _get_output
    message=httpmessage.from_request(response.request),
  File "/Library/Python/2.7/site-packages/httpie/httpmessage.py", line 28, in from_request
    body=request._enc_data,
AttributeError: 'Request' object has no attribute '_enc_data'
@jwarchol
Copy link
Author

Please let me know what I can provide to help you replicate and understand this error scenario.

@jkbrzt
Copy link
Member

jkbrzt commented May 17, 2012

Thanks for the report.

I was able to reproduce it with the latest version of requests. What version do you have installed?

$ pip freeze | grep requests
requests==0.12.1

@jwarchol
Copy link
Author

requests==0.12.1 here too

@jkbrzt
Copy link
Member

jkbrzt commented May 17, 2012

It looks like this commit is the culprit:

kennethreitz/requests@324336e

@dch
Copy link

dch commented Jun 1, 2012

FWIW you can depend on the old version like so:

put this into a file called pie.txt:

httpie
requests<0.12.0

and then:

pip uninstall requests httpie
pip install -r pie.txt

You should be fine now, assuming nothing else required requests > 0.12.0 of course.

This was referenced Jun 12, 2012
@ramsey
Copy link

ramsey commented Jun 12, 2012

The solution recommended by @dch works well. Thanks!

@jkbrzt
Copy link
Member

jkbrzt commented Jun 13, 2012

This was just fixed in #50 and consequently made compatible with older versions of requests as well by d544ec3.

@jkbrzt jkbrzt closed this as completed Jun 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants