mega.py
mega.py copied to clipboard
from mega import Mega - invalid syntax
- pip install mega.py
- 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
Use python 3, python 2 is already discontinued
I use python 3.9.1 and already get this error.
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.