[GH-ISSUE #923] Folder creation : failed ( operation not permitted) #552

Closed
opened 2026-02-27 23:23:17 +03:00 by kerem · 3 comments
Owner

Originally created by @PrudhviChakravarthy on GitHub (Dec 30, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/923

Describe the bug
installed spotipy in ipad ( 9 gen)
Application : Carnets ( ipython )

Your code

File "/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/Library/lib/python3.11/site-packages/spotdl/utils/spotify.py", line 18, in
from spotdl.utils.config import get_cache_path
File "/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/Library/lib/python3.11/site-packages/spotdl/utils/config.py", line 131, in
"cache_path": str(get_cache_path()),
^^^^^^^^^^^^^^^^
File "/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/Library/lib/python3.11/site-packages/spotdl/utils/config.py", line 67, in get_cache_path
return get_spotdl_path() / ".spotipy"
^^^^^^^^^^^^^^^^^
File "/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/Library/lib/python3.11/site-packages/spotdl/utils/config.py", line 43, in get_spotdl_path
os.mkdir(spotdl_path)
PermissionError: [Errno 1] Operation not permitted: '/private/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/.spotdl'

Expected behavior
Replace cache folder without “.” In it

Originally created by @PrudhviChakravarthy on GitHub (Dec 30, 2022). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/923 **Describe the bug** installed spotipy in ipad ( 9 gen) Application : Carnets ( ipython ) **Your code** File "/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/Library/lib/python3.11/site-packages/spotdl/utils/spotify.py", line 18, in <module> from spotdl.utils.config import get_cache_path File "/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/Library/lib/python3.11/site-packages/spotdl/utils/config.py", line 131, in <module> "cache_path": str(get_cache_path()), ^^^^^^^^^^^^^^^^ File "/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/Library/lib/python3.11/site-packages/spotdl/utils/config.py", line 67, in get_cache_path return get_spotdl_path() / ".spotipy" ^^^^^^^^^^^^^^^^^ File "/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/Library/lib/python3.11/site-packages/spotdl/utils/config.py", line 43, in get_spotdl_path os.mkdir(spotdl_path) PermissionError: [Errno 1] Operation not permitted: '/private/var/mobile/Containers/Data/Application/5A0F27B7-CFC5-4EF3-A1EF-41514180F426/.spotdl' **Expected behavior** Replace cache folder without “.” In it
kerem 2026-02-27 23:23:17 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@stephanebruckert commented on GitHub (Dec 30, 2022):

Interesting to see you develop on ipad!

Likely ipad doesn't allow creating folders just like on desktop. I believe you have two options:

We lack some examples around this but if you share your code we will be able to help.

<!-- gh-comment-id:1367801805 --> @stephanebruckert commented on GitHub (Dec 30, 2022): Interesting to see you develop on ipad! Likely ipad doesn't allow creating folders just like on desktop. I believe you have two options: - when using `SpotifyOAuth` or `SpotifyClientCredentials` you could set a custom `cache_handler=CacheFileHandler` with a custom `cache_path` that works for you https://github.com/spotipy-dev/spotipy/blob/cc5eaca191fd74f98dfb3df1436b5e24b2e31884/spotipy/cache_handler.py#L56 - you could avoid creating a file altogether by using a `CacheHandler` that isn't the default `CacheFileHandler` https://spotipy.readthedocs.io/en/2.22.0/#customized-token-caching. For a simple app my recommendation would be to use `MemoryCacheHandler`. We lack some examples around this but if you share your code we will be able to help.
Author
Owner

@PrudhviChakravarthy commented on GitHub (Jan 3, 2023):

Sorry for late reply - I’m not developing any app
Just testing so that i can create shortcut In a-shell mini which downloads songs for me

<!-- gh-comment-id:1369359003 --> @PrudhviChakravarthy commented on GitHub (Jan 3, 2023): Sorry for late reply - I’m not developing any app Just testing so that i can create `shortcut` In `a-shell mini` which downloads songs for me
Author
Owner

@stephanebruckert commented on GitHub (Mar 15, 2023):

Closing this but feel free to reopen with more details

<!-- gh-comment-id:1470983554 --> @stephanebruckert commented on GitHub (Mar 15, 2023): Closing this but feel free to reopen with more details
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/spotipy#552
No description provided.