mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[PR #964] [MERGED] Ignore Attribute error in Spotify.__del__ #1098
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#1098
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/spotipy-dev/spotipy/pull/964
Author: @johncheng2011
Created: 4/12/2023
Status: ✅ Merged
Merged: 5/15/2024
Merged by: @dieser-niko
Base:
master← Head:bug/inheriting-exceptions-in-init📝 Commits (5)
6cc817aignore if _session does not exist2063df0Merge branch 'spotipy-dev:master' into bug/inheriting-exceptions-in-initf647ca7update changelog17893a6Update CHANGELOG.md6d8d9d1Merge branch 'master' into bug/inheriting-exceptions-in-init📊 Changes
2 files changed (+7 additions, -2 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
spotipy/client.py(+5 -2)📄 Description
I was trying to create a class that Inherits spotipy.Spotify. But found this interaction where if an exception is raised in the child class's
__init__it will try to runSpotify.__del__whereself._sessionhasn't been defined yet. So it raises an Attribute Error instead of the Exception from the child class.For example
Will result in this error ignoring the Exception raised in the child class's
__init__🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.