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

UnboundLocalError

Open gauvainrobert opened this issue 4 years ago • 4 comments

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/')

gauvainrobert avatar Jul 22 '20 07:07 gauvainrobert

You need to log in first: image 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

knowledgeorange avatar Jul 22 '20 20:07 knowledgeorange

I got this error after exceeding my Mega download quota.

B3AU avatar Apr 22 '21 10:04 B3AU

Same here

Msameim181 avatar Nov 17 '21 14:11 Msameim181

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

snowman avatar May 28 '23 15:05 snowman