kde713/playlist-everywhere

Exception Handling이 올바르게 되지 않는 문제

kde713 opened this issue · 0 comments

Traceback (most recent call last):                         /s]
  File "/Users/kde713-handys/Documents/PersonalWorkspace/playlist-everywhere/playlist_everywhere/application/cli.py", line 182, in upload
    vendor_client.add_song_to_personal_playlist(new_playlist_id, song)
  File "/Users/kde713-handys/Documents/PersonalWorkspace/playlist-everywhere/playlist_everywhere/vendor/genie.py", line 87, in add_song_to_personal_playlist
    raise Exception(f'곡 추가에 실패했습니다. ({result["Result"].get("RetMsg")})')
Exception: 곡 추가에 실패했습니다. (실패)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kde713-handys/Documents/PersonalWorkspace/playlist-everywhere/playlist_everywhere/application/cli.py", line 184, in upload
    unregistered_song.append(f"{str(song)} ({e.message})")
AttributeError: 'Exception' object has no attribute 'message'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/kde713-handys/Documents/PersonalWorkspace/playlist-everywhere/playlist_everywhere/__main__.py", line 3, in <module>
    CliApplication().run()
  File "/Users/kde713-handys/Documents/PersonalWorkspace/playlist-everywhere/playlist_everywhere/application/cli.py", line 32, in run
    getattr(self, answers['action'])(answers['vendor'])
  File "/Users/kde713-handys/Documents/PersonalWorkspace/playlist-everywhere/playlist_everywhere/application/cli.py", line 201, in upload
    sys.stderr.write(f"오류가 발생했습니다: {e.message}")
AttributeError: 'AttributeError' object has no attribute 'message'