Closed byg0n3 closed 7 years ago
@dein0s I can't reproduce the bug with http://httpbin.org/xml
. Here's what we can do next:
1) Can you show me your full pip freeze
?
2) Are you able to reproduce the bug with a public accessible server? If not, can you provide your server-side code that can reproduce the bug?
Well, the first one is easy :)
(http_prompt) ~/Projects $ pip freeze
click==6.7
decorator==4.0.11
http-prompt==0.9.2
httpie==0.9.9
ipython==5.3.0
ipython-genutils==0.1.0
parsimonious==0.7.0
pexpect==4.2.1
pickleshare==0.7.4
prompt-toolkit==1.0.13
ptyprocess==0.5.1
Pygments==2.2.0
requests==2.13.0
simplegeneric==0.8.1
six==1.10.0
traitlets==4.3.2
wcwidth==0.1.7
About second - I don't have enough experience yet with http-prompt, switched to it only few weeks ago from httpie. I can't reproduce this exception on public servers and I'm not sure that I can provide you a server-side code right now as it is internal API for Plex Media Server and I use it only to debug my own plugin. I can try to dig around, but their framework is a big mess and has no up-to-date docs (last version is 6 years old and removed from official site) :| So I'm not sure that I'll be able to find it any time soon.
@dein0s The exception traceback is swallowed so it's not easy to debug. Here's another thing you can help. Add a line of code at line 523 in execute.py, so that:
original:
else:
# TODO: Better error message
click.secho(str(err), err=True, fg='red')
except CalledProcessError as err:
click.secho(err.output + ' (exit status %d)' % err.returncode,
fg='red')
after:
else:
# TODO: Better error message
click.secho(str(err), err=True, fg='red')
raise # <-- ADD THIS LINE
except CalledProcessError as err:
click.secho(err.output + ' (exit status %d)' % err.returncode,
fg='red')
Then retry what you did. This time the traceback should be printed. Paste the traceback here. It allows us to see where the error occurred.
Okay, looks like the problem was on server (my) side as there were an update for Plex Server and after installing it I can't reproduce this exception. I'll try to downgrade server version and test this issue again later on today.
Damn, still can't reproduce it, even rolled back the whole machine state from snapshot. Guess it was just some local magic, closed.
As title says, I'm getting exception when trying to fetch/save xml response. Same request works fine with raw httpie. Response example attached at the very end. env:
httpie options:
http-prompt get trace:
http-prompt get&save trace:
Same requests with raw httpie:
response_example.zip