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

Invalid bokeh attributes #11

Open
Kapitan11 opened this issue Mar 16, 2023 · 1 comment
Open

Invalid bokeh attributes #11

Kapitan11 opened this issue Mar 16, 2023 · 1 comment

Comments

@Kapitan11
Copy link

Hey!

I wanted to check out the notebook example-01.ipynb with one of my midi files yet I've already run into error:

Cell In[5], line 7
      5 plotter = Plotter(preset, plot_max_length_bar=4)
      6 pm = PrettyMIDI("data/ghostbusters.mid")
----> 7 plotter.show_notebook(pm)

File (...)/python3.10/site-packages/Visual_MIDI-1.1.0-py3.10.egg/visual_midi/visual_midi.py:436
    429 def show_notebook(self, pm: PrettyMIDI):
    430     """
    431     Shows the pretty midi object as a plot file in the notebook.
    432 
    433       :param pm: the PrettyMIDI instance to plot
    434       :return: the bokeh plot layout
    435     """
--> 436     plot = self.plot(pm)
    437     output_notebook()
    438     show(plot)

File (...)/python3.10/site-packages/Visual_MIDI-1.1.0-py3.10.egg/visual_midi/visual_midi.py:223
    214     box = BoxAnnotation(bottom=pitch,
    215                         top=pitch + 1,
    216                         fill_color="gray",
   (...)
    220                         line_width=1,
...
    365 if not matches:
    366     matches, text = sorted(properties), "possible"
--> 368 raise AttributeError(f"unexpected attribute {name!r} to {self.__class__.__name__}, {text} attributes are {nice_join(matches)}")

AttributeError: unexpected attribute 'render_mode' to Label, possible attributes are angle, angle_units, background_fill_alpha, background_fill_color, border_line_alpha, border_line_cap, border_line_color, border_line_dash, border_line_dash_offset, border_line_join, border_line_width, coordinates, group, js_event_callbacks, js_property_callbacks, level, name, propagate_hover, subscribed_events, syncable, tags, text, text_align, text_alpha, text_baseline, text_color, text_font, text_font_size, text_font_style, text_line_height, text_outline_color, visible, x, x_offset, x_range_name, x_units, y, y_offset, y_range_name or y_units

It might be a package versioning issue (?). I hope it helps, I would love to play around with your package.

@GerardvSchie
Copy link

GerardvSchie commented Feb 13, 2024

To temporarily fix it do:

pip install bokeh==2.4.3

Its a breaking change from a later bokeh version

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

2 participants