Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #112371

Re: Python Error message

From dieter <dieter@handshake.de>
Newsgroups comp.lang.python
Subject Re: Python Error message
Date 2016-08-05 09:03 +0200
Message-ID <mailman.187.1470380608.6033.python-list@python.org> (permalink)
References <710599b6-b8c3-4f5a-a3dd-48757b816a44@googlegroups.com> <87vazfn1ec.fsf@handshake.de>

Show all headers | View raw


GBANE FETIGUE <bemen77@gmail.com> writes:
> ...
> I am running a python script to run some CURL commands, and return the response which is the applicationId and the versionId. I was able to do it. Now the versionId value supposed to be used on the second CURL as a value of the applications key which is an array. but it doesn't work.I 'll post the error after running the command as well as the script. It seems like I have an error somewhere because the curl works manually if i run. 
>
> ec2-user@ip-172-31-21-77 playbooks]$ python mmc-uploader.py
> ...
> Final response<!DOCTYPE html><html>...<body><h1>HTTP Status 415 - </h1><div class="
>  line"></div><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server refused this request because the request entity is in a format not supported by the reque
>  sted resource for the requested method.</u></p><hr class="line"><h3>Apache Tomcat/8.0.26</h3></body></html>

What you see here is *not* a Python error message but an
error message from the server you have contacted.
It tells you:
"The server refused this request because the request entity is in a format not supported by the requested resource for the requested method."

This means, that in constructing your request you made some error - regarding
the "format" (which may mean the "Content-Type") for
the request "entity" (which may mean the request body).

I would check the service description to find out about what
"format" is expected and what the term "entity" means.
Then I would check the "curl" documentation to find out how to meet
those expectations.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Python Error message GBANE FETIGUE <bemen77@gmail.com> - 2016-08-04 08:31 -0700
  Re: Python Error message Chris Angelico <rosuav@gmail.com> - 2016-08-05 01:51 +1000
  Re: Python Error message Steven D'Aprano <steve+python@pearwood.info> - 2016-08-05 01:56 +1000
    Re: Python Error message Igor Korot <ikorot01@gmail.com> - 2016-08-04 12:09 -0400
    Re: Python Error message Chris Angelico <rosuav@gmail.com> - 2016-08-05 02:14 +1000
    Re: Python Error message MRAB <python@mrabarnett.plus.com> - 2016-08-04 17:19 +0100
    Re: Python Error message Terry Reedy <tjreedy@udel.edu> - 2016-08-04 15:36 -0400
    Re: Python Error message Chris Angelico <rosuav@gmail.com> - 2016-08-05 05:53 +1000
  Re: Python Error message dieter <dieter@handshake.de> - 2016-08-05 09:03 +0200

csiph-web