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

TypeError: ('Bad header in MIDI file.', b'') #9

Closed
ExodusSolis opened this issue Dec 17, 2020 · 1 comment
Closed

TypeError: ('Bad header in MIDI file.', b'') #9

ExodusSolis opened this issue Dec 17, 2020 · 1 comment

Comments

@ExodusSolis
Copy link

ExodusSolis commented Dec 17, 2020

Ran this on Google Colab, I uploaded a midi file and tested multiple and kept getting this error. What's going on?
(Also, IDK why the indentations arent working on the code)
`
#MIDI TO CSV

import py_midicsv as pm
def midi2csv():
save=input('filename\n')
print("Step 1")
owo=open(save,mode='w')
print("Step 2")
owo.write(str(pm.midi_to_csv(str(save)+'.mid')))
print("Step 3")
owo.close
print("Step 4")
messagebox.showinfo('Complete','file saved as {}'.format(save))
print("Step 5")
while 1==1:
x=input('midi to CSV: 0\nend: 2\n')
if x == '0':
midi2csv()
elif x == '2':
break
`

@ExodusSolis
Copy link
Author

Just user error

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

1 participant