campagnola / pyabc

Python library for parsing and analyzing ABC music notation
MIT License
20 stars 11 forks source link

Syntax error in code and parse error parsing web database #18

Closed RufusVS closed 3 years ago

RufusVS commented 3 years ago

I am very interested in this project but when I downloaded it today I got a syntax error when I tried to run it standalone, and upon correcting that, got a parsing error when it downloaded the web json file.

First Error:

C:\Users\rufuss\Music\pyabc\pyabc.py:142: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if mode is 'm':

After fixing, got this error:

    return "http://thesession.org/tunes/%d#setting%d" % (self.header['reference number'], self.header['setting'])
TypeError: %d format: a number is required, not str

After fixing, got this error:

Exception: Unable to parse: /d2 (3 ddd d2 (3 ddd | [Ad-]d (3 ddd c2Bc "etc." ||
http://thesession.org/tunes/13684#setting24291

At this point I submitted this issue.

campagnola commented 3 years ago

Thanks Rufus! This project has never had full support for all ABC syntax features. You should find that the unit tests pass, but expect to run into issues when grabbing tunes from thesession. If you wanted to submit PRs for any issues you find, I'd gladly review them.