The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

cURL in terminal vs Execute Program

sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager
edited November 2018 in Help

hi...strange thing here.  If I run a cURL command in the terminal, I get a perfectly good response.  If I run the EXACT same command via the "Execute Program" operator, I get an "error code 1".  Any thoughts?  [the OAuth token here only goes to a sandbox for testing...if you want to test it yourself, you'll have to request another one]

 

On Terminal:

      curl -H 'Accept: application/json' -H 'Authorization: Bearer bc4f3536e0794af9988ad348bac8bb1f' 'https://api.ed-fi.org/api/api/v2.0/2017/schools'

Response:

[

  {

    "id": "ceaa310e29674ce29a158ad4f2d487a7",

    "localEducationAgencyReference": {

etc...

 

In Execute Program:

     curl -H 'Accept: application/json' -H 'Authorization: Bearer bc4f3536e0794af9988ad348bac8bb1f' 'https://api.ed-fi.org/api/api/v2.0/2017/schools'

 

Response:

External tool error

Process 'curl -H 'Accept: application/json' -H 'Authorization: Bearer bc4f3536e0794af9988ad348bac8bb1f' 'https://api.ed-fi.org/api/api/v2.0/2017/schools'' exited with error code 1.

 

Scott

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    I think i saw something like this come across the support tickets. Was that you?

  • sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    Hmm I'm not sure that was me with the support ticket but I may have posted before.  As you know I do a lot of API work from within RM and getting all the settings to work is often quite challenging.  In this case I cannot even get out of the starting gate with Execute Program, much less Enrich Data via Webservice.  I have a hunch(?) that the problem in this case is with the decimal point in the URL ("v2.0") but I cannot be sure.  I have tried numerous encoding tricks but nothing so far.

     

    Using these operators is often looking down a black hole.  Is there a way to get more info to debug?  I have the error code keys now via GitHub but I would love to see more verbose debugging capabilities...

     

    Thanks as always.


    Scott

  • robinrobin Member Posts: 100 Guru

    Did you ever find an answer to this problem?

  • sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    no...it is still a quandary.  Can I too move threads to the new "Product Feedback" page?  :) Stay tuned.


    Scott

  • aengleraengler Member Posts: 6 Contributor II

    Hi there,

     

    also from here strong support for this topic.

    Working API-Calls often dont get executed via execute python, etc. with no clue where the problem is coming from. 

    Often problems are related to json in python in execute phyton (most prob java call). Therefore Strings and quotes are really messed up. 

    Getting more Feedback and better editior capabilites for executed code inside RM would really be helpfull. 

Sign In or Register to comment.