rckclmbr / pyportify

App to transfer your spotify playlists to Google Play Music
Apache License 2.0
779 stars 57 forks source link

ValueError: Unallowed PCT & P #111

Open mbyio opened 7 years ago

mbyio commented 7 years ago

Most of my music loaded correctly, but before finishing, I got an exception:

(658/781) Found 'Kristine W - Love Come Home (Kristine W & Franke Pharoah vs. Bitrocka Edit)' in Google Music
Error handling request
Traceback (most recent call last):
  File "site-packages\aiohttp\server.py", line 265, in start
  File "site-packages\aiohttp\web.py", line 96, in handle_request
  File "pyportify\middlwares.py", line 18, in index_handler
  File "pyportify\app.py", line 117, in transfer_start
  File "pyportify\app.py", line 169, in transfer_playlists
  File "asyncio\futures.py", line 358, in __iter__
  File "asyncio\tasks.py", line 290, in _wakeup
  File "asyncio\futures.py", line 274, in result
  File "asyncio\tasks.py", line 239, in _step
  File "pyportify\app.py", line 241, in search_gm_track
  File "pyportify\google.py", line 56, in find_best_track
  File "pyportify\google.py", line 48, in search_all_access
  File "pyportify\google.py", line 113, in _http_get
  File "site-packages\aiohttp\client.py", line 519, in __iter__
  File "site-packages\aiohttp\client.py", line 162, in _request
  File "site-packages\aiohttp\client_reqrep.py", line 79, in __init__
  File "site-packages\yarl\__init__.py", line 674, in with_query
  File "yarl\_quoting.pyx", line 49, in yarl._quoting._quote (yarl/_quoting.c:1444)
  File "yarl\_quoting.pyx", line 74, in yarl._quoting._do_quote (yarl/_quoting.c:1735)
ValueError: Unallowed PCT % P
rckclmbr commented 6 years ago

@michael-younkin can you make the playlist public and share it with me? Thanks.

itripley commented 6 years ago

i had this problem too but it was "ValueError; Unallowed PCT % D"

jeremymolina commented 6 years ago

It's related with the playlist, more precisely with characters in the song name.

I have some Portuguese music on the playlist where I get the same extract as the first post, some of one of the Portuguese song names is "10%", it seems as you have to enclosure the song name, bc the "%" is injecting and causing a fail while reading the playlist.

In the meantime you can:

  1. Delete the songs that have a "%" characters in the name from your playlist.
  2. Don't import this playlist.
  3. If you already selected this playlist to be imported, and you hit the error, go to the cmd/terminal windows press ctrl+c, this will cancel the reading for this playlist, and the import will continue for the others playlist, as long as there is no other playlist with a song name with a characters.