odwyersoftware / mega.py

Python library for the https://mega.nz/ API.
https://github.com/odwyersoftware/mega.py
Apache License 2.0
347 stars 166 forks source link

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

Open BlueNinja411 opened 4 years ago

BlueNinja411 commented 4 years ago

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'"

lr2bmail commented 4 years ago

+1

ggdog007 commented 4 years ago

same problem here when using it in Win10

Aotosatou14 commented 4 years ago

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

notSagyo commented 4 years ago

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

starfreck commented 4 years ago

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.

ZenEmulator commented 4 years ago

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

alejandro0619 commented 3 years ago

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)