– configparser error

While trying to keep my latest Gentoo installation as lightweight as possible I decided I didn’t really need a graphical music player. MoC (Music on Console) is a really great alternative that does its thing without devouring every available resource. However, I still needed a scrobbler to keep bragging about my excellent taste in music. The recommended tool for the job seemed to be, which only depends on Python 3.

The installation consisted of downloading the script itself (which I managed thank you) but upon testing my configuration I ran into the following error: -c ~/.mocpscrob/config 
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%o#X'

The problem (as spelled out in the error message) was that my password contained the percent sign. The string handler for the password field obviously didn’t see that one coming (string interpolation). The solution as the error message suggests is to escape the percent sign with another percent sign like this: %%o#X.

Yes, those are the last four characters of my password. Thus you only need the 21 remaining characters and the username ;-)

MOC audio player
Music on Console

Thank you for reading!
Feel free to waste more time by subscribing to my RSS feed or check out the human-readable sitemap for more content.