ironss / musicxml2chordpro

Extract chord charts from MusicXML files
5 stars 3 forks source link

error: AttributeError: 'NoneType' object has no attribute 'text' #1

Closed tukusejssirs closed 6 years ago

tukusejssirs commented 6 years ago

I just tested your code on Kubuntu 17.10 AMD64. I exported the the .xml file using MuseScore-2.1-x86_64.AppImage in terminal using ./MuseScore-2.1-x86_64.AppImage -o Song_name.xml Song_Name.mscz—without issues. The .mscz file I used, was from Now it's Time to Say Goodnight.

Then, I ran the following command; here’s the output, too.

python xml2pro.py test_ts.xml > test_ts.pro
Traceback (most recent call last):
  File "xml2pro.py", line 165, in <module>
    x1.process_file()
  File "xml2pro.py", line 64, in process_file
    self.process_root()
  File "xml2pro.py", line 69, in process_root
    self.title = title_element.text
AttributeError: 'NoneType' object has no attribute 'text'
tukusejssirs commented 6 years ago

I found the reason, why it happens. The work/score title must be set in File → Score Properties in the field workTitle (you need to scroll down—this field is at the bottom of the list).