Coder Social home page Coder Social logo

spotifymatcher's People

Contributors

boscodomingo avatar dependabot[bot] avatar lolzep avatar luisdemarcos avatar

Stargazers

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

Watchers

 avatar

spotifymatcher's Issues

UnicodeEncodeError: 'charmap' codec can't encode character '\\u2010' in position 83: character maps to <undefined>

What does this error mean? How do i solve it?

Traceback (most recent call last):
File "C:\Users..............\Downloads\SpotifyMatcher-master\SpotifyMatcher-master\main.py", line 133, in
"tracks"]['items'][0]['id']
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users..............\Downloads\SpotifyMatcher-master\SpotifyMatcher-master\main.py", line 136, in
failed_matches_file.write(f"{query_song_pair[1]}\n")
File "C:\Users..............\AppData\Local\Programs\Thonny\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2010' in position 83: character maps to

HTTPS Error for POST to playlist due to Insufficient client scope

HTTP Error for POST to https://api.spotify.com/v1/playlists/330htLm7fwLCb0W4nGmx3v/tracks with Params: {'position': None} returned 403 due to Insufficient client scope

Getting this error where it is unable to post it to the playlist I selected, even when I did not choose a playlist, it would display this error instead "WARNING: There was an error creating the playlist. Please, create one manually and paste its id in the terminal, after your username"

Edit: Additionally, is there a way to make it read japanese and korean characters? Most of my songs are japanese and korean and it breaks the script each time it encounters one.

TypeError during auth

In version 1.1, I get the following error whenever I try to run the script:

Traceback (most recent call last):
  File "/home/parras/Téléchargements/SpotifyMatcher/./main.py", line 134, in <module>
    if auth_manager.is_token_expired(token_info):
  File "/home/parras/.local/bin/SpotifyMatcher/lib/python3.9/site-packages/spotipy/oauth2.py", line 332, in is_token_expired
    return is_token_expired(token_info)
  File "/home/parras/.local/bin/SpotifyMatcher/lib/python3.9/site-packages/spotipy/oauth2.py", line 66, in is_token_expired
    return token_info["expires_at"] - now < 60
TypeError: 'NoneType' object is not subscriptable

The previous version (f91bf12) works fine.

Token expiration

After a certain duration of running the program, the access token to the Spotify API expires. This translates into the following error message:

HTTP Error for GET to https://api.spotify.com/v1/search returned 401 due to The access token expired

Apparently, instead of trying to renew the token and retrying, the script keeps going over the list of files with the same expired token.

IndexError: list index out of range

Hello! When running 1.1.2 from Powershell, I get the following error after processing just 86 songs:

Traceback (most recent call last):
  File "./main.py", line 163, in <module>
    result = sp.search(query_song_pair[0], limit=1)["tracks"]['items'][0]['id']
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./main.py", line 166, in <module>
    failed_matches_file.write(f"{query_song_pair[1]}\n")
  File "C:\Program Files\Python38\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2010' in position 3: character maps to <undefined>

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.