mega.py
mega.py copied to clipboard
UnboundLocalError
Hello ! I'm just trying to download a file of 10GB and I get the error:
UnboundLocalError: local variable 'i' referenced before assignment
with just this simple code:
from mega import Mega
mega = Mega()
mega.download_url('https://mega.nz/file/dtIAAA4B#wDsWFiFunaYTvljhVvqeCsvwDF31vHKxv39sOH7s2hg', '/content/')
You need to log in first:
look again in the documentation, use one of the ways:
m = mega.login(email, password)
login using a temporary anonymous account
m = mega.login()
and then use the 'm' as explained in the documentation
I got this error after exceeding my Mega download quota.
Same here
still same here login with anonymous account:
#!/usr/bin/env python
from mega import Mega
mega = Mega()
m = mega.login()
m.download_url("https://mega.nz/file/VhsjyIzK#KWI53NKvCwVKkzSNkvnwLVuGMADtY_4YJ5XjMFVwyFc")