Skuldur / Classical-Piano-Composer

MIT License
602 stars 318 forks source link

failed to find TimeSignature in meterStream; cannot process Measures #49

Open 368c opened 2 years ago

368c commented 2 years ago

When I ran lstm.py as it was, I got the error "failed to find TimeSignature in meterStream; cannot process Measures".

WhistlingKite commented 2 years ago

@368c

When I ran lstm.py as it was, I got the error "failed to find TimeSignature in meterStream; cannot process Measures".

Put the code on line 34, that is midi = converter.parse(str(file)) into a try, except block for the files giving this error. Example:

try:
    midi = converter.parse(str(file))
except StreamException:
    print('failed to find time signature for file %s' % file)