Connecting to external API via python code within Dataiku environment

Options
Ujj
Ujj Registered Posts: 3 ✭✭✭

This API connection does not seem to work within Dataiku environment but works perfectly when run via python on my local machine.

Answers

  • VitaliyD
    VitaliyD Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer Posts: 102 Dataiker
    edited July 17
    Options

    Hi,

    The issue is most likely due to an SSL error, but it is just a guess without seeing the error. If I'm correct, then the quickest fix is to add "verify=False".

    requests.get('https://example.com', verify=False) 

    Anyway, to say more, please provide a screenshot of the error from the notebook run.

    Best.

  • Ujj
    Ujj Registered Posts: 3 ✭✭✭
    Options

    I tried with verify= false, does not work.

    Refer attached for error message.

  • VitaliyD
    VitaliyD Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer Posts: 102 Dataiker
    Options

    Hi,

    Thanks for trying that.

    The error now is "KeyboardInterrupt". Which means the kernel of the notebook was interrupted. Could you please restart the kernel and try again. If the same error is shown, please try to remove the "verify=False" and send us what error will you get this time. Also, you can try to create a new code env and try with that.

    Best.

Setup Info
    Tags
      Help me…