Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Python API URL is responding with 404 Not Found
icon9.gif  Python API URL is responding with 404 Not Found [message #1015631] Fri, 01 March 2013 13:07 Go to next message
Colin Jones is currently offline Colin JonesFriend
Messages: 11
Registered: March 2013
Location: Aberdeen, UK
Junior Member
We just updated to Hudson 3.0.0 from our 2.3 installation, but have been having problems with another system which integrates with hudson via the Python API.

If I call servername:8080/job/myjob/api/python I just get:

HTTP ERROR 404

Problem accessing /job/myjob/api/python. Reason:

    Not Found

Powered by Jetty://


The XML interface seems OK, but not the python one. This did work prior to the upgrade.

Can anyone assist in what might be happening or why the python API does not seem to be working?
Re: Python API URL is responding with 404 Not Found [message #1015656 is a reply to message #1015631] Fri, 01 March 2013 14:46 Go to previous messageGo to next message
Duncan Mills is currently offline Duncan MillsFriend
Messages: 36
Registered: August 2011
Member

Agreed I see this problem as well - I've logged 402138 to track this and marked it for fixing in 3.0.1.

Duncan Mills
Eclipse Hudson team
Re: Python API URL is responding with 404 Not Found [message #1015685 is a reply to message #1015631] Fri, 01 March 2013 17:22 Go to previous messageGo to next message
Duncan Mills is currently offline Duncan MillsFriend
Messages: 36
Registered: August 2011
Member

OK it seems that we dropped Python support during the migration process to Eclipse because of some IP issues??
Anyway looking at the code involved the "python" support is just a simple extension of the JSON support (that is there) with the basic exception of the treatment of null values and booleans

So booleans are written as "True" in the python writer as opposed to "true", ditto in the case of false
Null values are written as "None"

So, if you switch to the /api/json doe it actually work for you? I suppose it depends on your parser...?


Duncan Mills
Eclipse Hudson team
Re: Python API URL is responding with 404 Not Found [message #1015687 is a reply to message #1015685] Fri, 01 March 2013 17:31 Go to previous messageGo to next message
Duncan Mills is currently offline Duncan MillsFriend
Messages: 36
Registered: August 2011
Member

Just checked and the Python JSONDecoder() will handle these differences for you
http://docs.python.org/3.3/library/json.html section 19.2.2
So it should be sufficient to use the JSON APIs


Duncan Mills
Eclipse Hudson team
Re: Python API URL is responding with 404 Not Found [message #1015891 is a reply to message #1015687] Mon, 04 March 2013 08:15 Go to previous message
Colin Jones is currently offline Colin JonesFriend
Messages: 11
Registered: March 2013
Location: Aberdeen, UK
Junior Member
Thanks Duncan - unfortunately the other software we are using doesn't allow us to directly specify the full API URL reference (it adds on the /api/python itself). Will raise bug with them also. Strange it was dropped for IP issues though if the code is almost identical to the JSON API?
Previous Topic:utter newbie user cannot login
Next Topic:Next Community Meeting
Goto Forum:
  


Current Time: Sun Dec 21 03:22:29 GMT 2014

Powered by FUDForum. Page generated in 0.02444 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software