Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute error upon attempt to generate Gantt chart visualization #14

Open
taiyihanle opened this issue Nov 23, 2022 · 2 comments
Open

Comments

@taiyihanle
Copy link

Hi there,

currently working on some preliminary testing for job scheduling research and followed through Batsim docs' tutorial of Gantt chart visualization with the Evalys Python library.
As I run a small Python script made available in this page:

from evalys.jobset import JobSet
from evalys import visu
js = JobSet.from_csv("out_jobs.csv")
visu.gantt.plot_gantt(js, label_jobs=True)

..the calling of the plot_gantt method triggers the following attribute error.

Traceback (most recent call last):
  File "/home/taiyihanle/Desktop/pybatsim-run/expe-out/hist.py", line 4, in <module>
    visu.gantt.plot_gantt(js, label_jobs=True)
  File "/home/taiyihanle/.local/lib/python3.10/site-packages/evalys/visu/gantt.py", line 216, in plot_gantt
    layout = core.SimpleLayout(wtitle=title)
  File "/home/taiyihanle/.local/lib/python3.10/site-packages/evalys/visu/core.py", line 111, in __init__
    super().__init__(wtitle=wtitle)
  File "/home/taiyihanle/.local/lib/python3.10/site-packages/evalys/visu/core.py", line 56, in __init__
    self.wtitle = wtitle
  File "/home/taiyihanle/.local/lib/python3.10/site-packages/evalys/visu/core.py", line 102, in wtitle
    self.fig.canvas.set_window_title(wtitle)
AttributeError: 'FigureCanvasGTK4Agg' object has no attribute 'set_window_title'

I am using Evalys 4.0.6, Ubuntu 22.04.1 LTS with GNOME 42.5 and Python 3.10.6.

@adfaure
Copy link
Collaborator

adfaure commented Nov 23, 2022

Hello, I don't know if evalys is style maintained (@bleuse, @mickours ?).
Have you considered using the R language as suggested here to build gantt charts ?

@bleuse
Copy link
Collaborator

bleuse commented Dec 5, 2022

Hi @taiyihanle,

evalys is no longer actively maintained, and unfortunately the set_window_title method has been removed from recent versions of matplotlib (see https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.6.0.html#classes-methods-and-attributes).
I pushed a fix 66f22da (not yet released) that should work for all backends.

Also, I think the doc example you mention is not working per se.
You should remove the label_jobs parameter as it is done by default.
I'll update the doc.

Tell us if this works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants