miditoolkit
miditoolkit copied to clipboard
Circular Import Issue
I've tried running the default intro code block:
import miditoolkit path_midi = miditoolkit.midi.utils.example_midi_file() midi_obj = miditoolkit.midi.parser.MidiFile(path_midi) print(midi_obj)
Which results in:
AttributeError: partially initialized module 'miditoolkit' has no attribute 'midi' (most likely due to a circular import)
I am running this on Python 3.9 with pip installation of miditoolkit. I verified that it is imported correctly and all the subfolders (i.e. midi, parser) are being referenced.
This ought to be fixed in recent versions (please see the updated example code from the README too).