tpaviot / ProcessScheduler

A Python package for automatic and optimized resource scheduling
https://processscheduler.github.io/
GNU General Public License v3.0
58 stars 17 forks source link

Problem saving gant diagram #132

Open JonAlvarezOgiza opened 9 months ago

JonAlvarezOgiza commented 9 months ago

Hi, I am trying to save the gantt diagram generated by the function render_gantt_plotly in a folder of the project. The problem I am encountering is that if i specify the fig_filename and the format to png in the fig.write_image function and i get the following error:

raise ValueError(startup_response.get("message", "Failed to start Kaleido subprocess"))
ValueError: --plotlyjs argument is not a valid URL or file path: 

No matter what i change that i keep getting this error all the time and i can't figure out how to fix it. Any help would be appreciated. Thanks

tpaviot commented 9 months ago

You need the kaleido package, see https://github.com/tpaviot/ProcessScheduler/blob/master/requirements.txt

JonAlvarezOgiza commented 9 months ago

I already have it, and it still shows the same error

tpaviot commented 9 months ago

I cannot reproduce the issue. Are you on Windows or Linux? Googling around points to the same issue here: https://github.com/plotly/Kaleido/issues/57

Do you have spaces or accents in your paths/filenames?

JonAlvarezOgiza commented 9 months ago

I did, when i replaced the accents it didn´t show the error anymore but it gets stuck on the render_gantt_plotly function as it was iterating over it forever. It only happens when i add the fig_filename parameter while calling the function. Using html_filename parameter it works