Re: Python Error message

2016-08-05 Thread dieter
; Final response...HTTP Status 415 - class=" > line">type Status reportmessage > description The server refused this request because > the request entity is in a format not supported by the reque > sted resource for the requested method.Apache > Tomcat/8.0.26 What

Re: Python Error message

2016-08-04 Thread Chris Angelico
On Fri, Aug 5, 2016 at 5:36 AM, Terry Reedy wrote: > An example of the latter is when one writes code in Python to execute > 'other' code. (IDLE is one example. It both executes user statements and > evals user expressions.) One needs "except BaseException:" to isolate the > interpreter from e

Re: Python Error message

2016-08-04 Thread Terry Reedy
On 8/4/2016 12:19 PM, MRAB wrote: In those rare occasions when you do write a bare except, A bare "except:" is never needed and in my opinion, and that of others, one should never write one (except possibly for experimentation). Be explicit and write "except BaseException:" or "except Except

Re: Python Error message

2016-08-04 Thread Chris Angelico
On Fri, Aug 5, 2016 at 2:09 AM, Igor Korot wrote: >> [1] There are exceptions to this rule, for experts. But if you need to ask >> what they are, you're not ready to know > > But even the experts will never write such a code - you never know what > happens > in a month. Server might throw some ne

Re: Python Error message

2016-08-04 Thread MRAB
On 2016-08-04 17:09, Igor Korot wrote: Steven, On Thu, Aug 4, 2016 at 11:56 AM, Steven D'Aprano wrote: On Fri, 5 Aug 2016 01:31 am, GBANE FETIGUE wrote: try: parsed_response = json.loads(response) deployid = parsed_response[u'id'] print "Your deployid is: " + deployid except: prin

Re: Python Error message

2016-08-04 Thread MRAB
On 2016-08-04 16:31, GBANE FETIGUE wrote: Hi, 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 whi

Re: Python Error message

2016-08-04 Thread Igor Korot
Steven, On Thu, Aug 4, 2016 at 11:56 AM, Steven D'Aprano wrote: > On Fri, 5 Aug 2016 01:31 am, GBANE FETIGUE wrote: > >> try: >> parsed_response = json.loads(response) >> deployid = parsed_response[u'id'] >> print "Your deployid is: " + deployid >> except: >> print 'Seems the named id

Re: Python Error message

2016-08-04 Thread Steven D'Aprano
On Fri, 5 Aug 2016 01:31 am, GBANE FETIGUE wrote: > try: > parsed_response = json.loads(response) > deployid = parsed_response[u'id'] > print "Your deployid is: " + deployid > except: > print 'Seems the named id already exists!' I'm not going to try to debug your code blindfolded wit

Re: Python Error message

2016-08-04 Thread Chris Angelico
On Fri, Aug 5, 2016 at 1:31 AM, GBANE FETIGUE wrote: > try: > parsed_response = json.loads(response) > print "Your applicationId is: " + parsed_response[u'applicationId'] > version_id = parsed_response[u'versionId'] > print "Your versionId is: " + version_id > except: > print '

Python Error message

2016-08-04 Thread GBANE FETIGUE
Hi, 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 p

Re: SAX XML Parse Python error message

2008-07-15 Thread Fredrik Lundh
goldtech wrote: I would be grateful for support with the code I cited. It's not long and fairly standard. I'm sure my error(s) would be glaring to more experienced coders. I appreciated the "heads-up" about other options but I would be grateful for help getting this code to run. Thanks For com

Re: SAX XML Parse Python error message

2008-07-13 Thread goldtech
On Jul 13, 5:30 pm, Waldemar Osuch <[EMAIL PROTECTED]> wrote: > On Jul 13, 3:00 pm, goldtech <[EMAIL PROTECTED]> wrote: > > > I would be grateful for support with the code I cited. It's not long > > and fairly standard. I'm sure my error(s) would be glaring to more > > experienced coders. I appreci

Re: SAX XML Parse Python error message

2008-07-13 Thread Waldemar Osuch
On Jul 13, 3:00 pm, goldtech <[EMAIL PROTECTED]> wrote: > I would be grateful for support with the code I cited. It's not long > and fairly standard. I'm sure my error(s) would be glaring to more > experienced coders. I appreciated the "heads-up" about other options > but I would be grateful for he

Re: SAX XML Parse Python error message

2008-07-13 Thread goldtech
I would be grateful for support with the code I cited. It's not long and fairly standard. I'm sure my error(s) would be glaring to more experienced coders. I appreciated the "heads-up" about other options but I would be grateful for help getting this code to run. Thanks On Jul 13, 11:47 am, Stef

Re: SAX XML Parse Python error message

2008-07-13 Thread Stefan Behnel
goldtech wrote: > My first attempt at SAX, but have an error message I need help with. Just in case you prefer writing readable code over debugging SAX code into existence, try lxml. http://codespeak.net/lxml/ Here is a presentation you might find interesting. http://codespeak.net/lxml/s5/lxml-

SAX XML Parse Python error message

2008-07-13 Thread goldtech
SAX XML Parse Python error message Hi, My first attempt at SAX, but have an error message I need help with. I cite the error message, code, and xml below. Be grateful if anyone can tell me what the fix is. Thanks. >>> Traceback (most recent call last): File "C:\Python24\Lib

Re: (EMBEDDING) Can't get python error message

2007-07-05 Thread Gabriel Genellina
En Thu, 05 Jul 2007 08:47:57 -0300, <[EMAIL PROTECTED]> escribió: > I run this string to produce a error "x+1" > > PyRun_SimpleStringFlags() return -1, so that i know this is a script > with error inside... > > but now - how can i get error message? Simply, you can't. From http://docs.python.org/

(EMBEDDING) Can't get python error message

2007-07-05 Thread anonymisiert85
I run this string to produce a error "x+1" PyRun_SimpleStringFlags() return -1, so that i know this is a script with error inside... but now - how can i get error message? i tested some py-functions - but this functions do not work... i called this functions direct after PyRun_SimpleStringFlags