Skip to main content

Here is my code:


#!./python36/bin/python3.6
import requests
import json
import sys, subprocess, datetime, json, math
def querySprintDetails(api_key, board_id ):
headers = {"Authorization" : api_key}
monday_url = 'https://api.monday.com/v2'
# store request body in a dict, including variables
req_data = {"query" : "{boards(ids:%d) { \\
items { \\
id \\
name \\
column_values{title text} \\
group{title} \\
}\\
}}"%(board_id)}
# make HTTP POST using requests
r = requests.post(url=monday_url, json=req_data, headers=headers)
if r.status_code != 200: # throw exception
print('Status:', r.status_code)
return -1
return r

r = querySprintDetails( api_key, board_id )

When I run directly this works. Whereas when I try to schedule this on oozie it starts failing


Traceback (most recent call last):
File "./getSprintData.py", line 79, in <module>
r = querySprintDetails( api_key, board_id )
File "./getSprintData.py", line 27, in querySprintDetails
r = requests.post(url=monday_url, json=req_data, headers=headers)
File "/grid/5/tmp/yarn-local/usercache/ma_d/appcache/application_1572358313567_19492469/container_e17_1572358313567_19492469_01_000001/python36/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/grid/5/tmp/yarn-local/usercache/ma_d/appcache/application_1572358313567_19492469/container_e17_1572358313567_19492469_01_000001/python36/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/grid/5/tmp/yarn-local/usercache/ma_d/appcache/application_1572358313567_19492469/container_e17_1572358313567_19492469_01_000001/python36/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/grid/5/tmp/yarn-local/usercache/ma_d/appcache/application_1572358313567_19492469/container_e17_1572358313567_19492469_01_000001/python36/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/grid/5/tmp/yarn-local/usercache/ma_d/appcache/application_1572358313567_19492469/container_e17_1572358313567_19492469_01_000001/python36/lib/python3.6/site-packages/requests/adapters.py", line 513, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.monday.com', port=443): Max retries exceeded with url: /v2 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1c09787e10>: Failed to establish a new connection: [Errno 110] Connection timed out',))
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], exit code [1]

Is it accessing wrong port? If yes, what port should i direct it to?

Using python 3.6


I am a noob. Sorry if this is a very basic question.

Hey @spb 👋


I do want to be up front and let you know that I’m not a Python developer, nor am I familiar with Oozie. Although I’m happy to see how I might be able to help! 🙂


I’d love to start by isolating whether this issue is related to Oozie, or perhaps to monday.com’s API. As it works for you in certain instances, my inclination is that it’s related to Oozie.


Although if you can send over any API call that’s being sent to monday.com when scheduling this within Oozie, I’d be happy to take a look and see if there might be any contributing factors in that instance.


I did a bit of research into the errors that you’re being returned within Oozie. I found a few resources that you might find helpful. While I’m not entirely certain these are related to your exact issue, I wanted to share them in case it’s helpful in pointing you in the right direction:



Thanks and I look forward to hearing from you 💪


-Scott