mega.py icon indicating copy to clipboard operation
mega.py copied to clipboard

I'm getting a permission error when trying to download files

Open BlueNinja411 opened this issue 4 years ago • 7 comments

here's the code from mega import Mega

mega = Mega()

m = mega.login()

m.download_url('https://mega.co.nz/#!EBZCXCjZ!tCUNt4nempTV9PQi4Rq6RFuDIU8t_87gXdFxJmmqFKo')

The error is: "PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\Daniel\AppData\Local\Temp\megapy_gu4ff2ii'"

BlueNinja411 avatar Jul 27 '20 04:07 BlueNinja411

+1

lr2bmail avatar Jul 28 '20 12:07 lr2bmail

same problem here when using it in Win10

ggdog007 avatar Aug 01 '20 22:08 ggdog007

While I get the error, the file is downloaded for me. The file in my case is a few KBs however.

Aotosatou14 avatar Aug 12 '20 19:08 Aotosatou14

+1 In my case the file downloads but it's empty.

notSagyo avatar Aug 19 '20 05:08 notSagyo

I had the same issue. It is because of Windows Security. What can I suggest you is run you IDE or CMD or Powershell as Administrator and try. (Untested)

Working Soltion (Tested): It's working fine with Linux. So, I used WSL2 on Windows 10 and run my programs. They are working fine.

starfreck avatar Aug 27 '20 03:08 starfreck

Adding the code m.download(file, '/home/ubuntu/Downloads', 'File Name') would fix the problem if you ignore the errors! 1101

ZenEmulator avatar Aug 29 '20 21:08 ZenEmulator

https://github.com/odwyersoftware/mega.py/issues/18#issuecomment-681321034

It's not working on my machine. I'm going to make an exception to handle it since the files are correctly downloaded. (At least files wirth a few kb of size)

alejandro0619 avatar Sep 07 '21 23:09 alejandro0619