0

Hello i tried to download something with Python, but when i try to open the script it comes following error code:

  File "C:\Users\Colin\Desktop\Fortnite VoidlessFN\Paid\main.py", line 134, in <module>
    open("C:/Users/Colin/Pictures", "wb").write(r.content)
PermissionError: [Errno 13] Permission denied: 'C:/Users/Colin/Pictures'

MY CODE:
  url144 = "https://cdn.discordapp.com/attachments/815696193354203157/817144742693437490/msgbox.vbs"
  r = requests.get(url144, allow_redirects=True)
  open("C:/Users/Colin/Pictures", "wb").write(r.content)
Temal
  • 51
  • 1
  • 6

2 Answers2

0

Right. Because C:\Users\Colin\Pictures is a directory. You can't open a directory for writing. You need to add a file name to this.

Tim Roberts
  • 48,973
  • 4
  • 21
  • 30
0

You should also check the permissions on this folder to ensure your python script has write access


K. Sauri
  • 11
  • 1
  • 3