soulfx / gmusic-playlist

playlist scripts for gmusic
MIT License
158 stars 57 forks source link

Error importing a playlist #15

Closed ajtb closed 9 years ago

ajtb commented 9 years ago

Hi,

When using import.py, I get an error:

Traceback (most recent call last): File "/Volumes/../Downloads/gmusic-playlist-master 3/ImportList.py", line 249, in if not search_result and re.search(match_string,details['title']): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 142, in search return _compile(pattern, flags).search(string) TypeError: expected string or buffer

Any idea what is going wrong and how can I resolve it?

soulfx commented 9 years ago

This is a bug in the script.  For a non detailed playlist, when it fails to find a search result, the title will most likely be null and python doesn't like it.

Until it gets fixed, try either updating your playlist so that the tracks are detailed tracks or comment out the problem code.

ajtb commented 9 years ago

I'm not sure what you mean when you say "detailed", but if it helps I'll just add I was using a playlist generated here: http://victorwyee.com/js/convert-spotify-http-urls-to-csv-with-jquery-spotify-api/ Together, these two tools would allow for pretty convenient way to move between Spotify and Google Music. File was saved as txt.

soulfx commented 9 years ago

Thanks, you are the second person to mention that Spotify export tool.  When I get a chance I'll make a wiki page with a link to it as others might find it helpful as well.

A detailed playlist consists of tracks in which the artist, title, and album details are arranged according to the order and separated by the character specified in the preferences.py file.

ajtb commented 9 years ago

Works like a charm, thanks! :)