Have worked a bit on trying to get Speckle Automate to work. Was actually able to get it running in more or less a day, so cheers for all the nice work so far, making it relatively easy to start.
I’m trying to run a basic test case, where I post-process some Speckle data using our own API, create an HTML table based on it, which I then want to store as a file result. At that point, the automation runs into an error. I’ve ran my automation without storing the file result, which then finishes successfully. See here the relevant code:
# Create a dataframe from the API response
building_data_df = pd.DataFrame(response['building_data'])
# Convert to HTML
building_data_html = building_data_df.to_html()
# Store as HTML
with open("./building_data.html", "w") as fp:
fp.write(building_data_html)
# Mark run as successful
automate_context.mark_run_success("Building data table successfully generated!")
# ERROR OCCURRING HERE!
# Attach the HTML table to the Speckle model
automate_context.store_file_result("./building_data.html")
See here the error I’m running into, it’s not finding a specific API endpoint when targeting the blob storage it seems:
To me, this seems like something that’s out of my hands, so therefore this forum post.
Also pleased to hear if either the path isn’t correctly set, or if storing HTML files has caveats.
It gives me the exact same error as described initially, so updating the file handling as proposed doesn’t solve the issue. Hope you have some more luck in running the checks : )
Apologies, @Rob, I have been checking in today. I can completely replicate this, and it would appear the SDK is not correctly calling the endpoint. If I find out more I’ll post a workaround, if not I have to pass it to the platform team.
Nope, doesn’t work yet. But just noticed a new version of specklepy (2.19.6) is available on Github, which should solve this issue, see below PR. Already noticed this double slash in the API endpoint it targets.
The 2.19.6 version is not available on PyPi yet, so I tried to directly include it in my project through a direct reference to Github, but this fails during building and deploying the function on Github. So I guess I’ll just anxiously wait for it to be released on pypi. Guess @gjedlicska is involved in that?