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


Groups > comp.lang.python > #112371

Re: Python Error message

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From dieter <dieter@handshake.de>
Newsgroups comp.lang.python
Subject Re: Python Error message
Date Fri, 05 Aug 2016 09:03:07 +0200
Lines 24
Message-ID <mailman.187.1470380608.6033.python-list@python.org> (permalink)
References <710599b6-b8c3-4f5a-a3dd-48757b816a44@googlegroups.com> <87vazfn1ec.fsf@handshake.de>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace news.uni-berlin.de q8yh18nX9XN7oVCEndyqqQxX+N8pALy3qrFvit+eSHMA==
Cancel-Lock sha1:xYt9bKF21gBHEcwkby0k/wZdKlM=
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; '*not*': 0.07; 'array.': 0.07; 'means,': 0.07; 'subject:Error': 0.07; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; '415': 0.16; 'means.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'run.': 0.16; 'work.i': 0.16; 'script.': 0.18; 'tells': 0.18; 'commands,': 0.22; 'seems': 0.23; 'second': 0.24; 'somewhere': 0.24; 'script': 0.25; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'command': 0.26; '(which': 0.26; 'header:X -Complaints-To:1': 0.26; 'supported': 0.27; 'error': 0.27; 'supposed': 0.31; 'post': 0.31; '"the': 0.32; 'run': 0.33; 'running': 0.34; 'server': 0.34; 'expected': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'mean': 0.38; 'format': 0.39; 'skip:e 20': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'term': 0.60; 'your': 0.60; 'here': 0.66; 'you:': 0.79; 'curl': 0.84
X-Injected-Via-Gmane http://gmane.org/
User-Agent Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <87vazfn1ec.fsf@handshake.de>
X-Mailman-Original-References <710599b6-b8c3-4f5a-a3dd-48757b816a44@googlegroups.com>
Xref csiph.com comp.lang.python:112371

Show key headers only | 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

#112332 
  #112333 
  #112334 
    #112335 
    #112336 
    #112337 
    #112348 
    #112350 
  #112371 

csiph-web