cuthbertLab / music21

music21 is a Toolkit for Computational Musicology
https://www.music21.org/
Other
2.09k stars 396 forks source link

SubConverterFileIOException: png file of xml not found. Is your file >999 pages? #230

Closed japrogramer closed 7 years ago

japrogramer commented 7 years ago

I have this notebook that was working a few versions ago, i decided to go back and run it and i get an error. architechture: 4.11.9-1-ARCH linux 4.11.9-1

Name : musescore Version : 2.1.0-1 Description : Create, play and print beautiful sheet music Architecture : x86_64 URL : http://musescore.org/ Licenses : GPL Groups : None Provides : None Depends On : desktop-file-utils gtk-update-icon-cache libpulse portaudio qt5-quickcontrols qt5-svg qt5-tools qt5-webkit shared-mime-info Optional Deps : lame: MP3 export [installed] Required By : None Optional For : None Conflicts With : None Replaces : None Installed Size : 58.50 MiB Packager : Maxime Gauduin alucryd@archlinux.org Build Date : Sun 07 May 2017 05:44:32 AM CDT Install Date : Wed 17 May 2017 08:21:34 AM CDT Install Reason : Explicitly installed Install Script : No Validated By : Signature

music21==3.1.0


from music21 import *
us = environment.UserSettings()
import IPython.display
#print(y)
print(us.getSettingsPath())
##us['musicxmlPath'] = '/usr/bin/musescore'
print(us['musicxmlPath'])
print(us['musescoreDirectPNGPath'])

    /home/archangel/.music21rc
    /usr/bin/musescore
    /usr/bin/musescore

converter.parse('tinynotation: 3/4 c4 d8 f g16 a g f#').show()

error message

converter.parse('tinynotation: 3/4 c4 d8 f g16 a g f#').show()

#IPython.display

---------------------------------------------------------------------------
SubConverterFileIOException               Traceback (most recent call last)
<ipython-input-3-07d160cac093> in <module>()
----> 1 converter.parse('tinynotation: 3/4 c4 d8 f g16 a g f#').show()
      2 #IPython.display

~/VENV/music_gpu3.6/lib/python3.6/site-packages/music21/stream/__init__.py in show(self, *args, **kwargs)
    255         if self.isSorted is False and self.autoSort:
    256             self.sort()
--> 257         return super(Stream, self).show(*args, **kwargs)
    258 
    259     #---------------------------------------------------------------------------

~/VENV/music_gpu3.6/lib/python3.6/site-packages/music21/base.py in show(self, fmt, app, **keywords)
   2586                                  app=app,
   2587                                  subformats=subformats,
-> 2588                                  **keywords)
   2589 
   2590     #--------------------------------------------------------------------------

~/VENV/music_gpu3.6/lib/python3.6/site-packages/music21/converter/subConverters.py in show(self, obj, fmt, app, subformats, **keywords)
    312 
    313             if 'Opus' not in obj.classes:
--> 314                 fp = helperSubConverter.write(obj, helperFormat, subformats=helperSubformats)
    315 
    316                 defaults.title = savedDefaultTitle

~/VENV/music_gpu3.6/lib/python3.6/site-packages/music21/converter/subConverters.py in write(self, obj, fmt, fp, subformats, **keywords)
    808 
    809         if subformats is not None and 'png' in subformats:
--> 810             fp = self.runThroughMusescore(fp, **keywords)
    811         return fp
    812 

~/VENV/music_gpu3.6/lib/python3.6/site-packages/music21/converter/subConverters.py in runThroughMusescore(self, fp, **keywords)
    772         fileLikeOpen.close()
    773         sys.stderr = storedStrErr
--> 774         return self.findPNGfpFromXMLfp(fpOut)
    775         #common.cropImageFromPath(fp)
    776 

~/VENV/music_gpu3.6/lib/python3.6/site-packages/music21/converter/subConverters.py in findPNGfpFromXMLfp(self, xmlFilePath)
    699             pngfp = xmlFilePath[0:len(xmlFilePath) - 4] + "-001.png"
    700         else:
--> 701             raise SubConverterFileIOException("png file of xml not found. Is your file >999 pages?")
    702         return pngfp
    703 

SubConverterFileIOException: png file of xml not found. Is your file >999 pages?
mscuthbert commented 7 years ago

It seems like the temp directory isn't being directly set. Sorry but we can't support config problems on Linux -- too many different configurations. If you can figure it out, please feel free to send a pull request.

japrogramer commented 7 years ago

@mscuthbert Temp directory is set according to what im seeing here


us = environment.UserSettings()
#print(y)
for key in sorted(us.keys()):
    try:
        print(key, us[key])
    except:
        print(key)

print('\n\n')
a = environment.Environment()
print(a.getDefaultRootTempDir())
autoDownload ask
braillePath None
debug 0
directoryScratch None
graphicsPath None
ipythonShowFormat ipython.musicxml.png
lilypondBackend ps
lilypondFormat pdf
lilypondPath lilypond
lilypondVersion None
localCorporaSettings {}
localCorpusPath
localCorpusSettings []
manualCoreCorpusPath None
midiPath None
musescoreDirectPNGPath /usr/bin/musescore
musicxmlPath /usr/bin/musescore
pdfPath None
showFormat musicxml
vectorPath None
warnings 1
writeFormat musicxml

/tmp/music21
mscuthbert commented 7 years ago

Sorry, but the team is too small to support OSes beyond Mac and PC -- you might ask the community on music21list for help or if you absolutely need the help, consider consulting support. I appreciate the interest, but there just aren't enough of us for the variety of other OS configurations.