Open tomahocbc opened 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!
I have the same error and i'm logged (that's a public mega.nz folder)
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.
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
How do you solve it?
I'm interested in, if somebody knows how to fix it.
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.
mega.errors.RequestError: EACCESS, Access violation (e.g., trying to write to a read-only share)