miditoolkit icon indicating copy to clipboard operation
miditoolkit copied to clipboard

Circular Import Issue

Open JLenzy opened this issue 3 years ago • 1 comments

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.

JLenzy avatar Feb 10 '23 03:02 JLenzy

This ought to be fixed in recent versions (please see the updated example code from the README too).

akx avatar Nov 29 '23 07:11 akx