Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SubConverterFileIOException - music 21 show()

I just installed music21, and I'm trying to get started on it. I have Musescore3 installed, but I can't make the show() funcion work.

I've tried changing the paths, following some instructions I found online, but to no avail


from music21 import *

us = environment.UserSettings()
us['musicxmlPath'] = 'D:\\Program Files\\MuseScore 3\\bin\\Musescore3.exe'
us['musicxmlPath'] = 'D:\\Program Files\\MuseScore 3\\bin\\Musescore3.exe'

I'm trying to do a simple show()

from music21 import *

f = note.Note('F5')
f.show()

Here's the error I got:

Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 7.4.0 -- An enhanced Interactive Python.

runfile('D:/Users/Pedro/Pedro/Projeto Python-Música/music21test.py', wdir='D:/Users/Pedro/Pedro/Projeto Python-Música')
D:\Program Files\MuseScore 3\bin\Musescore3.exe
Traceback (most recent call last):

  File "<ipython-input-1-19e1672511d4>", line 1, in <module>
    runfile('D:/Users/Pedro/Pedro/Projeto Python-Música/music21test.py', wdir='D:/Users/Pedro/Pedro/Projeto Python-Música')

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile
    execfile(filename, namespace)

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "D:/Users/Pedro/Pedro/Projeto Python-Música/music21test.py", line 14, in <module>
    f.show()

  File "C:\ProgramData\Anaconda3\lib\site-packages\music21\base.py", line 2580, in show
    **keywords)

  File "C:\ProgramData\Anaconda3\lib\site-packages\music21\converter\subConverters.py", line 360, in show
    subformats=helperSubformats, **keywords)

  File "C:\ProgramData\Anaconda3\lib\site-packages\music21\converter\subConverters.py", line 938, in write
    fp = self.runThroughMusescore(fp, subformats, **keywords)

  File "C:\ProgramData\Anaconda3\lib\site-packages\music21\converter\subConverters.py", line 895, in runThroughMusescore
    return self.findPNGfpFromXMLfp(fpOut)

  File "C:\ProgramData\Anaconda3\lib\site-packages\music21\converter\subConverters.py", line 807, in findPNGfpFromXMLfp
    "png file of xml not found. Or file >999 pages?")

SubConverterFileIOException: png file of xml not found. Or file >999 pages?
like image 216
Pedro Proença Avatar asked Nov 30 '25 01:11

Pedro Proença


1 Answers

I have encountered this situation, Because you can't use Musscore3 when you run on jupyter. Try run with terminal it can work

like image 140
Laugh Avatar answered Dec 01 '25 15:12

Laugh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!