ixce / gmusicimport Goto Github PK
View Code? Open in Web Editor NEWSimple playlist importer for Google Play Music
Simple playlist importer for Google Play Music
Hi,
this script seems to be broken with the current version of gmusicapi. The search issue can be fixed by changing line 52 to
results = client.search(query)
However there are more errors. Maybe you could put a note in the Readme that this does not work at the moment, so people don't waste time :).
Can you share the code of " Instance-level video segmentation from object tracks", Recently I am studying the video segmentation, and I want to reproduce your idea? I need your help. Thank you for your help !
The encoding error that means no files get recognised in Windows. benjymouse figured it out for your deezerexport so I'm just trying to insert his fix into your gmusicimport but since I'm a pynoob maybe you could show us your skills?
Tyvm for reading this,
Alexis
it gives this issue when i run
Traceback (most recent call last):
File "/home/USER/desktop/gmusicimport.py", line 52, in
results = client.search_all_access(query)
AttributeError: 'Mobileclient' object has no attribute 'search_all_access'
btw it have a ")" more in the line 38 that was easily fixed but an issue is a issue
hi
i have successfully executed the code
train_data, test_data = train_test_split(movie_df, test_size = 0.20, random_state=0)
print(train_data.head(5))
but when i am trying to executed the code
pm = Recommenders.popularity_recommender_py()
pm.create(train_data, 'userId' , 'movie')
the following error are displayed
KeyError Traceback (most recent call last)
in
1 # Simple popularity based recommender...Not exclusive for a particular user
2 pm = Recommenders.popularity_recommender_py()
----> 3 pm.create(train_data, 'userId' , 'movie')
~/Recommender_system/Recommenders.py in create(self, train_data, user_id, item_id)
21
22 #Sort the movies based upon recommendation score
---> 23 train_data_sort = train_data_grouped.sort_values(['score', self.item_id], ascending = [0,1])
24
25 #Generate a recommendation rank based upon score
~/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py in sort_values(self, by, axis, ascending, inplace, kind, na_position)
4409 for x in by:
4410 k = self._get_label_or_level_values(x, axis=axis,
-> 4411 stacklevel=stacklevel)
4412 keys.append(k)
4413 indexer = lexsort_indexer(keys, orders=ascending,
~/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py in _get_label_or_level_values(self, key, axis, stacklevel)
1380 values = self.axes[axis].get_level_values(key)._values
1381 else:
-> 1382 raise KeyError(key)
1383
1384 # Check for duplicates
KeyError: 'score'
I had problem with run of this script. After pip install gmusicapi is installed gmusicapi version 2.0 and then I always get error:
gmusicapi.Mobileclient1 (shared:269) [ERROR]: the response format for Search was not recognized.
After this I uninstalled gmusicapi from PIP pip uninstall gmusicapi, download fresh gmusicapi from https://github.com/simon-weber/Unofficial-Google-Music-API, unpack folder gmusicapi to /lib/python-2.7/site-packages/gmusicapi and everything works well.
This solution could be useful for someone other ๐
Hello,
I exported my playlist from deezer and I want import it on Google music but it doesn't working well.. I'm a programmer but I don't know much about python.
The problem is this:
Traceback (most recent call last): File "gmusicimport.py", line 21, in from gmusicapi import Mobileclient File "c:\Python34\lib\site-packages\gmusicapi__init__.py", line 9, in from gmusicapi.clients import Webclient, Musicmanager, Mobileclient File "c:\Python34\lib\site-packages\gmusicapi\clients__init__.py", line 1, in from gmusicapi.clients.webclient import Webclient File "c:\Python34\lib\site-packages\gmusicapi\clients\webclient.py", line 3, in from urlparse import urlparse, parse_qsl ImportError: No module named 'urlparse'
Can anybody help me with this issue?
Thanks.
param_grid = {'n_epochs': [5, 10], 'lr_all': [0.002, 0.005],
'reg_all': [0.4, 0.6]}
grid_search = GridSearchCV(SVD, param_grid, measures=['rmse', 'mae'], cv=3, n_jobs=1)
data = Dataset.load_builtin('ml-100k')
TypeError Traceback (most recent call last)
in ()
6 'reg_all': [0.4, 0.6]}
7 # Cross-validation using grid search
----> 8 grid_search = GridSearchCV(SVD, param_grid, measures=['rmse', 'mae'], cv=3, n_jobs=1)
9 # Find the best parameters on the data set
10 data = Dataset.load_builtin('ml-100k')
TypeError: init() got an unexpected keyword argument 'measures'
Traceback (most recent call last):
File "GMF.py", line 126, in
model = get_model(num_users, num_items, num_factors, regs)
File "GMF.py", line 68, in get_model
user_latent = Flatten()(MF_Embedding_User(user_input))
File "/usr/local/lib/python3.6/dist-packages/keras/engine/base_layer.py", line 425, in call
self.build(unpack_singleton(input_shapes))
File "/usr/local/lib/python3.6/dist-packages/keras/layers/embeddings.py", line 112, in build
dtype=self.dtype)
File "/usr/local/lib/python3.6/dist-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/base_layer.py", line 243, in add_weight
weight = K.variable(initializer(shape, dtype=dtype),
TypeError: init_normal() got an unexpected keyword argument 'dtype'
bash-3.2$ python2 gmusicimport.py -u *USERNAME* -v --dry-run playlists.json
Logging in as *USERNAME* to Google Play Music
Password:
[/!\] We're currently running in dry-run mode
Checking importability of *PLAYLIST*
Fetching matches for *SONG*
Traceback (most recent call last):
File "gmusicimport.py", line 62, in <module>
hit["score"], hit["track"]["title"],
KeyError: 'score'
Can't crack this one :-(
Here are the changes needed to make this compatible with the latest gmusicapi
diff --git a/gmusicimport.py b/gmusicimport.py
index b3bccd0..057fd1d 100755
--- a/gmusicimport.py
+++ b/gmusicimport.py
@@ -35,7 +35,7 @@ if __name__ == "__main__":
args = parser.parse_args()
print("Logging in as \"%s\" to Google Play Music" % args.username)
pw = getpass.getpass()
- if not client.login(args.username, pw):
+ if not client.login(args.username, pw, Mobileclient.FROM_MAC_ADDRESS):
print("Authentication failed. Please check the provided credentials.")
with open(args.source) as f:
data = json.load(f)
@@ -48,14 +48,15 @@ if __name__ == "__main__":
print("Importing %s" % playlist["title"])
toimport = []
for track in playlist["tracks"]:
- query = "%s %s" % (track["title"], track["artist"])
- results = client.search_all_access(query)
+ query = "%s %s" % (track["title"].replace('Album Version', ''), track["artist"])
+ results = client.search(query)
match = None
if args.verbose:
print("Fetching matches for %s" % query)
for hit_i, hit in enumerate(results["song_hits"]):
if hit_i >= 10:
break
+ hit['score'] = 1000.0 # new API doesnt return score
if args.verbose and hit_i < 10:
print("Hit %d, scoring %.02f: %s by %s in %s" %
(hit_i + 1,
I am getting several errors. First one:
bash-3.2$ python2 gmusicimport.py -u "[email protected]" -v --dry-run playlists.json
Logging in as "[email protected]" to Google Play Music
Password:
Traceback (most recent call last):
File "gmusicimport.py", line 38, in <module>
if not client.login(args.username, pw):
TypeError: login() takes exactly 4 arguments (3 given)
After some debugging I edited line 38 to:
if not client.login(args.username, pw, Mobileclient.FROM_MAC_ADDRESS):
This got me a step further!
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.