Giter Site home page Giter Site logo

gmusicimport's People

Contributors

gosuto-inzasheru avatar ixce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gmusicimport's Issues

Currently broken?

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 :).

code+instance level segmentation from video

        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 !

Encoding error means no files match

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

AttributeError: 'Mobileclient' object has no attribute 'search_all_access'

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

Error occured when i executed the code

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'

Not working for PIP gmusicapi (currently version 2.0)

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 ๐Ÿ˜ƒ

I cannot import playlist

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.

type error when i using surprise

param_grid = {'n_epochs': [5, 10], 'lr_all': [0.002, 0.005],
'reg_all': [0.4, 0.6]}

Cross-validation using grid search

grid_search = GridSearchCV(SVD, param_grid, measures=['rmse', 'mae'], cv=3, n_jobs=1)

Find the best parameters on the data set

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'

i got the type error when i execute .py script in colab with tensor flow verion 1.15.0

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'

KeyError: 'score' (line 62)

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 :-(

Fixes for latest gmusicapi

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,

TypeError: login() takes exactly 4 arguments (3 given) (line 38)

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.