Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception class 'KeyError' on trying to play a track #20

Open
FA85 opened this issue Dec 10, 2022 · 1 comment
Open

Exception class 'KeyError' on trying to play a track #20

FA85 opened this issue Dec 10, 2022 · 1 comment
Labels
bug Something isn't working question Further information is requested stale Issue hasn't moved in a while

Comments

@FA85
Copy link

FA85 commented Dec 10, 2022

Hi,

thanks for your work on bringing Deezer to Kodi. After I freshly installed DeezerKodi 1.0.0 on LibreElec 10.0.3 on a RPi4 I run into the following error message in the logs. I got a Deezer Premium account and can browse my playlists etc., but playback fails everytime with any song.

2022-12-09 23:54:49.807 T:2329     INFO <general>: DeezerKodi: Starting DeezerKodi v1.0.0
2022-12-09 23:54:49.807 T:2329     INFO <general>: DeezerKodi: Initializing router with location /tracks/1958028657/play
2022-12-09 23:54:49.807 T:2329     INFO <general>: DeezerKodi: Connection: Requesting streaming for track with id 1958028657 ...
2022-12-09 23:54:49.978 T:2329    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'code'
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.audio.deezer/addon.py", line 13, in <module>
                                                       APP.run()
                                                     File "/storage/.kodi/addons/plugin.audio.deezer/app/application.py", line 52, in run
                                                       items = self.__router.route(self)
                                                     File "/storage/.kodi/addons/plugin.audio.deezer/app/http/router.py", line 56, in route
                                                       return action(**parameters)
                                                     File "/storage/.kodi/addons/plugin.audio.deezer/app/actions/tracks_actions.py", line 20, in play
                                                       url = Api.instance().request_streaming(identifiant)
                                                     File "/storage/.kodi/addons/plugin.audio.deezer/app/http/api.py", line 215, in request_streaming
                                                       self._obtain_access_token()
                                                     File "/storage/.kodi/addons/plugin.audio.deezer/app/http/api.py", line 132, in _obtain_access_token
                                                       Api.check_error(response)
                                                     File "/storage/.kodi/addons/plugin.audio.deezer/app/http/api.py", line 238, in check_error
                                                       ApiExceptionFinder.from_error(response['error'])
                                                     File "/storage/.kodi/addons/plugin.audio.deezer/lib/exceptions/__init__.py", line 26, in from_error
                                                       if exception.CODE == error['code']:
                                                   KeyError: 'code'
                                                   -->End of Python script error report<--

2022-12-09 23:54:50.171 T:2329     INFO <general>: Python interpreter stopped
2022-12-09 23:54:50.194 T:1455    ERROR <general>: Playlist Player: skipping unplayable item: 245, path [plugin://plugin.audio.deezer/?path=%2Ftracks%2F1958028657%2Fplay]

I read about a similar problem in #13 and that you may have fixed it. Maybe I'm running into the same...?

Regards,
FA85

@Valentin271 Valentin271 added bug Something isn't working question Further information is requested labels Dec 12, 2022
@Valentin271
Copy link
Owner

Hello,

I couldn't find the root cause of the problem because I don't have enough information.
I have fixed the specific error you posted, which occured while handling the real error.

I'll have more information when you update to v1.0.1.

@Valentin271 Valentin271 added the stale Issue hasn't moved in a while label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested stale Issue hasn't moved in a while
Projects
None yet
Development

No branches or pull requests

2 participants