ironss/musicxml2chordpro

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

Closed this issue · 1 comments

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'

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).