[GH-ISSUE #251] [REQUEST] change stored_credentials path #41

Closed
opened 2026-02-27 08:11:35 +03:00 by kerem · 2 comments
Owner

Originally created by @van4oza on GitHub (Nov 15, 2023).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/251

I'm trying to use librespot in AWS Lambda, but the only RW dir there is /tmp. librespot keeps creating credentials file in os.getcwd(). even if I override it keeps getting back and failing

spotify_builder = Session.Builder()
spotify_builder.conf.stored_credentials_file = "/tmp/conf/spotify_credentials.json"
session = spotify_builder.user_pass("test@test.test", "mypswd").create()

Probably there is solution already?

Originally created by @van4oza on GitHub (Nov 15, 2023). Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/251 I'm trying to use librespot in AWS Lambda, but the only RW dir there is /tmp. librespot keeps creating credentials file in os.getcwd(). even if I override it keeps getting back and failing ``` spotify_builder = Session.Builder() spotify_builder.conf.stored_credentials_file = "/tmp/conf/spotify_credentials.json" session = spotify_builder.user_pass("test@test.test", "mypswd").create() ``` Probably there is solution already?
kerem 2026-02-27 08:11:35 +03:00
Author
Owner

@kokarare1212 commented on GitHub (Nov 15, 2023):

Perhaps passing Session.Configuration as an argument to the constructor of Session.Builder will work.

https://github.com/kokarare1212/librespot-python/blob/main/librespot/core.py#L1367-L1420
https://github.com/kokarare1212/librespot-python/blob/main/librespot/core.py#L1690-L1840

<!-- gh-comment-id:1813341843 --> @kokarare1212 commented on GitHub (Nov 15, 2023): Perhaps passing Session.Configuration as an argument to the constructor of Session.Builder will work. https://github.com/kokarare1212/librespot-python/blob/main/librespot/core.py#L1367-L1420 https://github.com/kokarare1212/librespot-python/blob/main/librespot/core.py#L1690-L1840
Author
Owner

@van4oza commented on GitHub (Nov 15, 2023):

thx!

<!-- gh-comment-id:1813351888 --> @van4oza commented on GitHub (Nov 15, 2023): thx!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot-python-kokarare1212#41
No description provided.