Hi guys,
I was wondering if someone could guide me with this. I am trying to send an annual daylight recipe as part of a payload to pollination using the API, however I don’t think I am understanding ‘where’ the epw file gets adding to the set of artifacts in the payload. Or is this even the way to do it? Below you will see the sequence of .hbjsons that get uploaded as well as the .epw, but the response still seems to say that the wea file is missing…
{'detail': 'Conflict: Project already exists'}
{'owner': 'ladybug-tools', 'name': 'annual-daylight', 'tag': '0.8.7-viz'}
['shoe-box_width5.0_height3.7_depth5.0_wwr0.4.hbjson', 'shoe-box_width5.5_height3.8_depth5.5_wwr0.4.hbjson', 'shoe-box_width4.5_height3.6_depth4.5_wwr0.4.hbjson', 'shoe-box_width4.0_height3.5_depth4.0_wwr0.4.hbjson', 'Copenhagen_dry_Danmark_2013.epw']
{'file': ('models/honeybee-json-files/shoe-box_width5.0_height3.7_depth5.0_wwr0.4.hbjson',
<_io.BufferedReader name='models/honeybee-json-files/shoe-box_width5.0_height3.7_depth5.0_wwr0.4.hbjson'>)}
<Response [204 No Content]>
{'file': ('models/honeybee-json-files/shoe-box_width5.5_height3.8_depth5.5_wwr0.4.hbjson',
<_io.BufferedReader name='models/honeybee-json-files/shoe-box_width5.5_height3.8_depth5.5_wwr0.4.hbjson'>)}
<Response [204 No Content]>
{'file': ('models/honeybee-json-files/shoe-box_width4.5_height3.6_depth4.5_wwr0.4.hbjson',
<_io.BufferedReader name='models/honeybee-json-files/shoe-box_width4.5_height3.6_depth4.5_wwr0.4.hbjson'>)}
<Response [204 No Content]>
{'file': ('models/honeybee-json-files/shoe-box_width4.0_height3.5_depth4.0_wwr0.4.hbjson',
<_io.BufferedReader name='models/honeybee-json-files/shoe-box_width4.0_height3.5_depth4.0_wwr0.4.hbjson'>)}
<Response [204 No Content]>
{'file': ('models/wea-files/Copenhagen_dry_Danmark_2013.epw',
<_io.BufferedReader name='models/wea-files/Copenhagen_dry_Danmark_2013.epw'>)}
<Response [204 No Content]>
{'detail': [{'loc': ['arguments', 0], 'msg': 'missing required argument wea', 'type': 'value_error'}, {'loc': ['arguments', 1], 'msg': 'missing required argument wea', 'type': 'value_error'}, {'loc': ['arguments', 2], 'msg': 'missing required argument wea', 'type': 'value_error'}, {'loc': ['arguments', 3], 'msg': 'missing required argument wea', 'type': 'value_error'}, {'loc': ['arguments', 4], 'msg': 'missing required argument wea', 'type': 'value_error'}]}
Traceback (most recent call last):
File "/Users/karimdaw/Projects/pollination-app/src/call_pollination.py", line 75, in <module>
job_id = res.json()['id']
KeyError: 'id'
Maybe if someone could give me an example of how to organize sending the required files for an annual daylight recipe to pollination using the API that would be awesome
Here is a link to the script. pollination-app/call_pollination.py at 0464fd6d5e7ce2c51be043fedc230f6bf3909d7b · karim-daw/pollination-app · GitHub