pavelkomarov / exportify Goto Github PK
View Code? Open in Web Editor NEWExport Spotify playlists using the Web API. Analyze them in the Jupyter notebook.
Home Page: https://exportify.net
License: MIT License
Export Spotify playlists using the Web API. Analyze them in the Jupyter notebook.
Home Page: https://exportify.net
License: MIT License
When doing "export all", all my playlists successfully downloaded except for the one playlist with podcasts, and I received the error message in the title. The playlist contained podcasts from TMG Studios, Serena Shahidi, Alie Ward, and Gimlet.
Congrats on this beautiful package! I merely wanted to point out that perhaps release date
is not the most spot-on marker to answer the question of which era of music do I prefer
. In my case, I have many classical music tracks, and you can see the problem here really clear :)
Couldn't export ChRoDa's Playlist - Collab. Encountered TypeError: Cannot read properties of undefined (reading 'forEach').
Above error is being returned when trying to export. please advise. Thanks
I'm experiencing some issues upon plotting the artist bar chart with Exportify. The first script runs without issue, but it seems that there's some error in the Artist column, which I suspect could be empty cells in the CSV, but I'm hoping that the code can run regardless? Any help would be much appreciated
I have a very large playlist and keep getting the TypeError: song.track is null error. It is very difficult to find all removed songs in a playlist and I have scanned it multiple times but keep missing a few. It should be pretty easy to specify which track is failing since they're still shown in the UI when "Show unavailable songs in playlists" is enabled.
Couldn't export misfits 2.0 with id 37i9dQZF1DXciq74vrQmM8. Encountered TypeError: Cannot read properties of null (reading 'artists').
https://open.spotify.com/playlist/37i9dQZF1DXciq74vrQmM8?si=293198ddc2c14fe6
Currently there's no way to log out without going to Spotify's site or clearing the cache. Is there a way to add a sign out button that signs out Spotify in the browser so the user can get back to the Get Started button and let someone else log in?
I'm attempting to export a playlist of over 4000 songs, and am getting this error.
It is a public playlist: Jeremy's Rock/Alternative Compilation (Over 4000 Songs)(https://open.spotify.com/playlist/7FGgXBLt8dHkX9yhC2ugSZ)
ValueError Traceback (most recent call last)
Cell In[32], line 11
9 pyplot.subplot(1, 3, 2)
10 axes = seaborn.countplot(data['Key'])
---> 11 axes.set(xticklabels=['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'])
12 pyplot.ylabel('Num Songs')
13 pyplot.title('Key')
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/artist.py:147, in Artist.init_subclass..(self, **kwargs)
139 if not hasattr(cls.set, '_autogenerated_signature'):
140 # Don't overwrite cls.set if the subclass or one of its parents
141 # has defined a set method set itself.
142 # If there was no explicit definition, cls.set is inherited from
143 # the hierarchy of auto-generated set methods, which hold the
144 # flag _autogenerated_signature.
145 return
--> 147 cls.set = lambda self, **kwargs: Artist.set(self, **kwargs)
148 cls.set.name = "set"
149 cls.set.qualname = f"{cls.qualname}.set"
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/artist.py:1231, in Artist.set(self, **kwargs)
1227 def set(self, **kwargs):
1228 # docstring and signature are auto-generated via
1229 # Artist._update_set_signature_and_docstring() at the end of the
1230 # module.
-> 1231 return self._internal_update(cbook.normalize_kwargs(kwargs, self))
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/artist.py:1223, in Artist._internal_update(self, kwargs)
1216 def _internal_update(self, kwargs):
1217 """
1218 Update artist properties without prenormalizing them, but generating
1219 errors as if calling set
.
1220
1221 The lack of prenormalization is to maintain backcompatibility.
1222 """
-> 1223 return self._update_props(
1224 kwargs, "{cls.name}.set() got an unexpected keyword argument "
1225 "{prop_name!r}")
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/artist.py:1199, in Artist._update_props(self, props, errfmt)
1196 if not callable(func):
1197 raise AttributeError(
1198 errfmt.format(cls=type(self), prop_name=k))
-> 1199 ret.append(func(v))
1200 if ret:
1201 self.pchanged()
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/axes/_base.py:74, in _axis_method_wrapper.set_name..wrapper(self, *args, **kwargs)
73 def wrapper(self, *args, **kwargs):
---> 74 return get_method(self)(*args, **kwargs)
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/_api/deprecation.py:297, in rename_parameter..wrapper(*args, **kwargs)
292 warn_deprecated(
293 since, message=f"The {old!r} parameter of {func.name}() "
294 f"has been renamed {new!r} since Matplotlib {since}; support "
295 f"for the old name will be dropped %(removal)s.")
296 kwargs[new] = kwargs.pop(old)
--> 297 return func(*args, **kwargs)
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/axis.py:1969, in Axis.set_ticklabels(self, labels, minor, fontdict, **kwargs)
1965 if isinstance(locator, mticker.FixedLocator):
1966 # Passing [] as a list of labels is often used as a way to
1967 # remove all tick labels, so only error for > 0 labels
1968 if len(locator.locs) != len(labels) and len(labels) != 0:
-> 1969 raise ValueError(
1970 "The number of FixedLocator locations"
1971 f" ({len(locator.locs)}), usually from a call to"
1972 " set_ticks, does not match"
1973 f" the number of labels ({len(labels)}).")
1974 tickd = {loc: lab for loc, lab in zip(locator.locs, labels)}
1975 func = functools.partial(self._format_with_dict, tickd)
ValueError: The number of FixedLocator locations (1), usually from a call to set_ticks, does not match the number of labels (12).
In Firefox, if I click "Export All" on the first page, I get a pop-up window that shows the number "400" w/ nothing else (I have 470 playlists). If I hit OK, it pops up again a couple times, and at the bottom of the page is the usual API Rate Limiting error.
Great tool! Is it possible to modify so that it also exports a full list of albums present in my library? Thanks
Every week I download the Discover Weekly playlist using Exportify.
Sometimes, the CSV is like this (18 columns):
"Track URI","Track Name","Artist URI(s)","Artist Name(s)","Album URI","Album Name","Album Artist URI(s)","Album Artist Name(s)","Album Release Date","Album Image URL","Disc Number","Track Number","Track Duration (ms)","Track Preview URL","Explicit","Popularity","Added By","Added At"
"spotify:track:6SUAy45EiUMI7YmExYb0Bd","Glueland","spotify:artist:73N7cGNNww6Uod1d3IiBKP","Do Nothing","spotify:album:5hDLsYgo29dLQtDnY03toa","THE EP'S","spotify:artist:73N7cGNNww6Uod1d3IiBKP","Do Nothing","2021-09-24","https://i.scdn.co/image/ab67616d0000b273209d8e1c0cc5c82607a056fc","1","6","162295","","false","3","spotify:user:","2022-08-08T02:00:00Z"
But other times it is like this (23 columns):
Spotify ID,Artist IDs,Track Name,Album Name,Artist Name(s),Release Date,Duration (ms),Popularity,Added By,Added At,Genres,Danceability,Energy,Key,Loudness,Mode,Speechiness,Acousticness,Instrumentalness,Liveness,Valence,Tempo,Time Signature
4CQwIJsYFk80DBWlwsDJGo,"29Wmfm1CojrjQ3aQP0FI65","Alabaster","Sleeping Through The War","All Them Witches",2017-02-24,417533,44,spotify:user:,2022-08-15T02:00:00Z,"blues rock,indie rock,modern blues rock,neo-psychedelic,space rock",0.513,0.887,0,-6.569,0,0.0566,0.135,0.00207,0.0997,0.512,117.481,4
The common columns among both formats are:
Why is that? Is there any way to always download in the same format?
Couldn't export πβοΈπππ. Encountered TypeError: Cannot read properties of undefined (reading 'forEach')
"
Couldn't export πΆAnimeπΆ. Encountered TypeError: Cannot read properties of null (reading 'id').
"
While attempting to export a file named "CALDAS V", I encountered the following error:
TypeError: Cannot read properties of null (reading 'id')
Expected Behavior:
The file should export without any errors.
Actual Behavior:
The export process fails and the following error message is displayed: TypeError: Cannot read properties of null (reading 'id').
Additional Information:
The error occurs consistently with the same file.
Thank you for your assistance in resolving this issue.
It seems like this Project is way behind other Versions by now for example https://github.com/watsonbox/exportify who offers a lot of features and even export of the favourites playlist. Id suggest to redirect the projects web Page exportify.net to the for now more advanced https://watsonbox.github.io/exportify/ page. If id have knewn about the other fork/project id have used that one instead and i feel like the webpage should include a link to the latest and most advanced version. Especially since this Project seems rather abondoned.
When exporting "https://open.spotify.com/playlist/218lExucf3LwPG9EomDHgr?si=6c4d7fe85b044510", I receive the following error, "Couldn't export Mark Morrison. Encountered TypeError: Cannot read properties of undefined (reading 'forEach')".
Edit Update: FYI - The most likely cause of this failure is the playlist is constructed from local files. I created this playlist in this manner because the songs are not available on Spotify.
Receiving this error message when trying to export my playlists
Couldn't export On Record with id 37i9dQZF1EOseykvieHu3m. Encountered TypeError: Cannot read properties of null (reading 'artists').
Please [let us know](https://github.com/pavelkomarov/exportify/issues/10). The others are still being zipped.
[Β«](https://exportify.net/#)
Tried to export all my playlists but got that. Not sure which record corresponds to 37i9dQZF1EOseykvieHu3m
.
TypeError Traceback (most recent call last)
Cell In[16], line 3
1 years = defaultdict(int)
2 for i,song in data.iterrows():
----> 3 years[song['Release Date'][:4]] += 1
5 years = pandas.DataFrame(years.items(), columns=['Year', 'Num Songs']
6 ).sort_values('Year')
8 pyplot.figure(figsize=(10, 6))
TypeError: 'float' object is not subscriptable
Trying to export some playlists results in an HTTP 400 response. What is malformed about those requests?
Hello,
Is there a way when exporting all playlists to export into one large file?
I have over 300 plus playlists and to do this manually takes way too much time.
Hoping someone could guide me on if this is possible.
Thanks
It would be nice if the table were more interactive so a user could click "Tracks" or "Name" and sort the rows in ascending/descending order.
I don't think it's local files because I just exported a playlist with 10000 songs and offline songs on it.
Please help with this error. Thanks.
Couldn't export Liked 2022.09.27. Encountered TypeError: Cannot read properties of undefined (reading 'forEach')
In Firefox, after loading my playlists, the arrows above the "Export All" button to go to the next page are not responding when clicked.
AttributeError Traceback (most recent call last)
Cell In[21], line 6
3 youngest = int(years['Year'].values[-1])
4 missing_years = [str(x) for x in range(eldest+1, youngest) if
5 str(x) not in years['Year'].values]
----> 6 ago = years.append(pandas.DataFrame.from_dict(
7 {'Year': missing_years, 'Num Songs': [0 for x in range(len(missing_years))]})
8 ).sort_values('Year', ascending=False).reset_index(drop=True)
10 y = []
11 for i in range(ago.shape[0]):
File /srv/conda/envs/notebook/lib/python3.10/site-packages/pandas/core/generic.py:5989, in NDFrame.getattr(self, name)
5982 if (
5983 name not in self._internal_names_set
5984 and name not in self._metadata
5985 and name not in self._accessors
5986 and self._info_axis._can_hold_identifiers_and_holds_name(name)
5987 ):
5988 return self[name]
-> 5989 return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'append'
Your code is trying to fill in missing years in the dataset and then fit a gamma distribution to the number of songs released each year. However, there are a few issues that need to be addressed:
When appending missing years, ensure the data types match for concatenation.
The gamma distribution fitting might need an initial guess for the shape parameter, which can be provided as an argument to the fit method.
Couldn't export Soft Pinoy oldies with id 78DdTXlmGEyUvauMAI7zNA. Encountered TypeError: Cannot read properties of null (reading 'id').
I was confused about why the Export All functionality in watsonbox's version was taking a string when an array of playlist objects is already available. The reason is because that list is only those currently displayed, but the expected behavior is to download all, which has to involve querying Spotify to get the full list, 50 at a time.
Either make the button actually export all, or somehow make it clear it's intended only to grab the 20 shown so users aren't confused.
I didn't realize originally, but Spotify provides their features extracted from the audio too! https://developer.spotify.com/documentation/web-api/reference/tracks/get-audio-features/ This is exciting, because it enables more analysis. Unfortunately it's going to mean yet another (massive) wave of traffic to the servers and slow down the app a lot, but definitely worth it.
hey,
thank you for running exportify.net!
compared to the version from watsonbox, there doesn't seem to be a way to enable the "Include album data" option.
I was specifically looking for it because I wanted to export the label name for each song
would you consider adding the label field, or allowing "advanced" options to be set by the user?
thanks!
Hi, I didnt find in the output a csv with my liked songs, is this supported? Is there any limitation in the API for this?
Encountered TypeError: Cannot read properties of null (reading 'id').
Playlist https://open.spotify.com/playlist/19mgUlKqP2M6SOpaQWM6Fw?si=119bd5789ced4c55
My .travis.yml was specifying nodejs as the language, but I changed it over to python for converting the notebook to html. It's possible to run multiple languages in travis, but I'd like to have something to run in the nodejs portion first.
What's the best testing architecture for web apps these days, and what should my set of tests test?
ValueError Traceback (most recent call last)
Cell In[28], line 15
12 pyplot.title(category)
14 pyplot.subplot(9, 2, i*2+2)
---> 15 pyplot.imshow(pyplot.imread('https://developer.spotify.com/assets/audio/'+
16 category.lower()+'.png'))
17 pyplot.axis('off')
19 pyplot.tight_layout(h_pad=2)
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/pyplot.py:2195, in imread(fname, format)
2193 @_copy_docstring_and_deprecators(matplotlib.image.imread)
2194 def imread(fname, format=None):
-> 2195 return matplotlib.image.imread(fname, format)
File /srv/conda/envs/notebook/lib/python3.10/site-packages/matplotlib/image.py:1558, in imread(fname, format)
1554 img_open = (
1555 PIL.PngImagePlugin.PngImageFile if ext == 'png' else PIL.Image.open)
1556 if isinstance(fname, str) and len(parse.urlparse(fname).scheme) > 1:
1557 # Pillow doesn't handle URLs directly.
-> 1558 raise ValueError(
1559 "Please open the URL for reading and pass the "
1560 "result to Pillow, e.g. with "
1561 "np.array(PIL.Image.open(urllib.request.urlopen(url)))
."
1562 )
1563 with img_open(fname) as image:
1564 return (_pil_png_to_float_array(image)
1565 if isinstance(image, PIL.PngImagePlugin.PngImageFile) else
1566 pil_to_array(image))
ValueError: Please open the URL for reading and pass the result to Pillow, e.g. with np.array(PIL.Image.open(urllib.request.urlopen(url)))
.
Just bought the domain for two years. Create a CNAME record and jump through the other hoops to make pavelkomarov.com/exportify/app into exportify.net, so people can find and remember it easier.
Individual playlists are rate limited through the delay
parameter to apiCall
in the JavaScrpt, but the cumulative calls for many can run us in to the limit really fast. The loop that gets the csvs for each playlist should have some Promise architecture so the app constructs the zip serially instead of in parallel.
Additionally, the spinner and text change to "Exporting" that so improves UX of the export buttons should be added to the Export All button.
I'm trying to export all my spotify playlists and i'm receiving errors on a lot of them. This one being the most important.
"Couldn't export Favorites. Encountered TypeError: Cannot read properties of undefined (reading 'forEach')."
what does that mean?
In Chrome, the "Get Started" button doesn't respond when clicked. I've noticed this same problem with buttons on other Spotify web backup apps in Chrome.
Discovered by @shape55. spotify:playlist:53eljwwaQQhi93Zbet44si is an example. There is a song in there called Walk Alone that for some reason comes back as mostly empty JSON. If I intentionally add this song to a different playlist and export that one, I see the song's JSON comes back filled.
Makes no sense. Somehow the playlist itself is corrupted. Spotify's client must have some workaround, because the song shows up fine there. I need to at least catch these cases so the app doesn't crash.
Please post the URIs or links for playlists that just cause the button to spin forever, indicating a crash, in this thread. There are many ways things could potentially go wrong, so I foresee getting a lot of mileage out of this one.
Exportify fails to export any playlist that has a local file in it. It is clear that Spotify manages local files differntly than those retrieved from its own servers. There is likely a property (perhaps Spotify Track ID) that doesn't exist for local files that only can be found in files retrieved from Spotify's servers which is the source of this error.
Example Error:
Couldn't export Mark Morrison with id 218lExucf3LwPG9EomDHgr. Encountered TypeError: Cannot read properties of undefined (reading 'forEach').
I first reported this error back in June and have heard nothing.
UPDATE: I've discovered such a field which is missing in local files but exists in those on Spotify's servers, The field is labeled
"ISRC" by Musicbackuper in its JSON exports.
Discovered by @shape55 over on #9. I need a way to see whether a file already exists in the JSZip and add _#
to the end of the filename if it does (or maybe prepend the name of the folder where the playlist lives?), because JSZip's file(name, data)
function also serves a value-updating purpose.
I can't see where in @watsonbox's code this could have been addressed. He's accumulating names by calling the fileName
function, then using those as keys to load values in to the zip, just like I am. It's possible this issue went completely unnoticed because anyone with few enough playlists to successfully use the not-rate-limited Export All functionality over there is unlikely to have any with duplicate names.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.