gpt4 book ai didi

python - SubConverterFileIOException - 音乐 21 显示 ()

转载 作者:行者123 更新时间:2023-12-05 06:25:59 35 4
gpt4 key购买 nike

我刚刚安装了 music21,我正在尝试开始使用它。我安装了 Musescore3,但我无法使 show() 函数工作。

我试过按照我在网上找到的一些说明更改路径,但无济于事


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'

我正在尝试做一个简单的 show()

from music21 import *

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

这是我得到的错误:

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?

最佳答案

我遇到过这种情况,因为在jupyter上运行时不能使用Musscore3。尝试用终端运行它可以工作

关于python - SubConverterFileIOException - 音乐 21 显示 (),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56514068/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com