Which tool versions are you using?
SDK: v14
Platform: v2023.04.3
Python: v3.10
Isolation mode: venv
Current Behavior
Most apps have a report downoad option to Word. Using plotly go.Figure objects.
Plotly uses Kaleido as engine to convert object to image.
However in one application:
Method 1 (full report) works on my pc, doesn’t work on staging, doesn’t work on pc of a collegue
Method 2 (see snippit) works on my pc, works on staging, doesn’t work on pc of a collegue
We both have windows laptops.
The code stops running when writing to a buffer or at the downloadresult, adding it to word doens’t give a problem.
Most sipmlistic method that doesn’t work:
def download_word_report_2(self, **kwargs) -> DownloadResult:
progress_message("Word rapport wordt aangemaakt en gedownload...")
doc = PileReport(template_word_path=WORD_EMPTY_TEMPLATE_PATH, name="project_name", app_version=VERSION)
_fig = go.Figure(data=
go.Contour(
z=[[10, 10.625, 12.5, 15.625, 20],
[5.625, 6.25, 8.125, 11.25, 15.625],
[2.5, 3.125, 5., 8.125, 12.5],
[0.625, 1.25, 3.125, 6.25, 10.625],
[0, 0.625, 2.5, 5.625, 10]]
))
cur_par = doc.add_pile_group_internal_forces_plotly(
cur_par=doc.cur_par,
name="pg.name",
fig_internal_forces=_fig
)
progress_message("Report has been created")
return DownloadResult(file_content=doc.get_report_as_file, file_name=f"{55}.docx")
Error message:
Expected Behavior
Plotly figures shouldn’t give problems when downloading.
No idea why it works for most apps using plotly, why it always work on the development env of my laptop. But doesn’t work for this specific app/method, while it never works for my collegue
Any suggestions?