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

from mega import Mega - invalid syntax

Open vsp245 opened this issue 3 years ago • 3 comments

  1. pip install mega.py
  2. just try 'from mega import Mega' and execute

Get this:

    from mega import Mega
  File "C:\Program Files (x86)\Python27\lib\site-packages\mega\__init__.py", line 1, in <module>
    from .mega import Mega  # noqa
  File "C:\Program Files (x86)\Python27\lib\site-packages\mega\mega.py", line 165
    url = f'{self.schema}://g.api.{self.domain}/cs'
                                                  ^
SyntaxError: invalid syntax

vsp245 avatar Dec 19 '20 03:12 vsp245

Use python 3, python 2 is already discontinued

darkash avatar Dec 31 '20 12:12 darkash

I use python 3.9.1 and already get this error.

Ppang0405 avatar Jan 15 '21 19:01 Ppang0405

Try using python 3.6 or 3.7 I am using 3.6 cause in my eyes it's currently the most stable.

Edit: Also it could be possible that you have installed the wrong mega.py If u used:

pip install mega

Uninstall it and install mega.py instead of just mega.

BadMaliciousPyScripts avatar Feb 03 '21 16:02 BadMaliciousPyScripts