Skip to content

[Question] Permission denied on mobile #2541

Answered by burhansvural
Vallekralle asked this question in Q&A
Discussion options

You must be logged in to vote

Question

I tried to write to a new file that doesn't exists yet (on mobile). With the code snippet:

video_req = requests.get(url=self.data[0]['urls'][1]["url"], allow_redirects=True)  # just gets the video with an api, it works fine

with open(f"/storage/emulated/0/Download/literallyme.mp4", "wb") as f:
    f.write(video_req.content)

When I try this on my pc it works perfectly fine, without any problem, but when I build the apk and install the app on my mobile phone, it shows the error msg: [Errno 13] Permission denied: '/storage/emulated/0/Download/literallyme.mp4'. I think my problem is that I need the permission, like when you try to get a file or folder with the FilePicker-Class fro…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Vallekralle
Comment options

Answer selected by Vallekralle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants