odwyersoftware / mega.py

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

mega.errors.RequestError: EACCESS, Access violation (e.g., trying to write to a read-only share) #49

Open tomahocbc opened 3 years ago

tomahocbc commented 3 years ago

mega.errors.RequestError: EACCESS, Access violation (e.g., trying to write to a read-only share)

DSP501 commented 3 years ago

mega.errors.RequestError: EACCESS, Access violation (e.g., trying to write to a read-only share) from mega import Mega mega = Mega() email = "" password = "" m = mega.login(email, password)

This will work!

flolep2607 commented 3 years ago

image I have the same error and i'm logged (that's a public mega.nz folder)

rayguy81 commented 3 years ago

I got this error when using the sample code as it appears on https://pypi.org/project/mega.py/ (and admittedly not reading the comment properly....)

m = mega.login(email, password)
# login using a temporary anonymous account
m = mega.login()

Only use one login or the other. Having both causes the error.

mhidoart commented 1 year ago

i guess this error comes from multiple logging .

for me i have a working script that upload a list of files but when i've tried to make multitasking (upload multiple files at once ) i got the famous error of access violation since i connect to the account multiple times in a short periode

BEASTBOYMAYURA commented 1 year ago

How do you solve it?

LeoChabrier commented 9 months ago

I'm interested in, if somebody knows how to fix it.

effusiveperiscope commented 2 weeks ago

The reason this happened for me is because I was trying to download a file link from a shared folder, and mega.py doesn't have proper parsing or request handling for these links.

For reference I am testing with this link: https://mega.nz/folder/Q1U21T7Q#atKULSspwGHue3o3WnmsrQ/file/IhlETJzb If you insert print(file_handle, file_key) in mega.py under the _download_file method you will see that it parsed atKULSspwGHue3o3WnmsrQ/file/IhlETJzb as the file_key which is obviously not correct.

The link to the individual file, on the other hand, can be downloaded by mega.py: https://mega.nz/file/x4EhgIgY#Z78uuGzQXQhkdxHGfQgqqgawrk2KLDoSRbY5OYJtrP0 If you own the relevant folder, you can obtain the individual link from in the mega.nz interface. Otherwise I think it is much harder.