Update cli.py fix KeyError: 'attributes' #150
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Traceback (most recent call last):
File "C:\Users\Naphat Sornwichai\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\cli.py", line 487, in main
f'({queue_progress}) Downloading "{track_metadata["attributes"]["name"]}"'
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'attributes'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\Naphat Sornwichai\AppData\Local\Programs\Python\Python312\Scripts\gamdl.exe_main.py", line 7, in
File "C:\Users\Naphat Sornwichai\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Naphat Sornwichai\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\Naphat Sornwichai\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Naphat Sornwichai\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Naphat Sornwichai\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\cli.py", line 764, in main
f'({queue_progress}) Failed to download "{track_metadata["attributes"]["name"]}"',
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'attributes'