Open BrianZbr opened 3 years ago
Your python file name is probably mega.py Change it
No, the only file anywhere in ~/
with that name is /home/dowcet/.local/lib/python3.8/site-packages/mega/mega.py
Same issue here.
Hi ,
I think you installed the wrong pip package. you should have installed : pip3 install mega.py
I suggest removing the old package like this :
pip3 uninstall mega
and then:
pip3 install mega.py
hope it helps
hello where run this command " from mega import Mega " , in the terminal or other folder. Please tell me
hello where run this command " from mega import Mega " , in the terminal or other folder. Please tell me
@sahilkundu That is not a command, that is a line of code which imports Mega in a Python project. You need to create a file, set its extension to .py
and import it like that (from mega import Mega
). Then write all the code you want. I hope it helps.
Hi , I think you installed the wrong pip package. you should have installed :
pip3 install mega.py
I suggest removing the old package like this :pip3 uninstall mega
and then:pip3 install mega.py
hope it helps
nah still not working
I have the same probem
I have a similar issue:
[/root/mirrorbot]:# ./start.sh
/bin/sh: 1: gunicorn: not found
Bad command line: You cannot use -d (or --daemon): qBittorrent is already running for this user.
Run application with -h option to read about command line parameters.
2022-09-24 12:53:57,453 - bot - INFO - Generating USER_SESSION_STRING
2022-09-24 12:53:57,454 - bot - INFO - Generating TELEGRAPH_TOKEN using 'zqBukQPu' name
2022-09-24 12:53:57,689 - root - WARNING - MEGA Credentials not provided!
2022-09-24 12:53:57,690 - root - WARNING - BASE_URL_OF_BOT not provided!
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/root/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/mirrorbot/bot/main.py", line 20, in
Itried everything, any idea?
For me it worked using:
from mega.mega import Mega
For me it worked using:
from mega.mega import Mega
Oh my god it worked! Thank you!
I was having the same problem.
- Finally what I did is instead of doing "pip install mega.py".
- I downloaded the tarball of the project (https://files.pythonhosted.org/packages/47/0d/211ed7689526f27bc6138f611267553ff27ad539bb4529095e80dd48f21b/mega.py-1.0.8.tar.gz) from pypi.org
- and run "pip install \mega.py-1.0.8.tar.gz"
work for me thanks!
I'm having an issue, when I tried to run the program gives me this error, I tried everything u said in this post:
Traceback (most recent call last): File "c:\Users\Administrator\Desktop\saot\pedro.py", line 1, in <module> from mega.mega import Mega File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega\__init__.py", line 1, in <module> from .mega import Mega # noqa ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega\mega.py", line 18, in <module> from tenacity import retry, wait_exponential, retry_if_exception_type File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\__init__.py", line 451, in <module> from tenacity._asyncio import AsyncRetrying File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\_asyncio.py", line 33, in <module> class AsyncRetrying(BaseRetrying): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\_asyncio.py", line 41, in AsyncRetrying @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
I have same problem
I'm having an issue, when I tried to run the program gives me this error, I tried everything u said in this post:
Traceback (most recent call last): File "c:\Users\Administrator\Desktop\saot\pedro.py", line 1, in <module> from mega.mega import Mega File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega\__init__.py", line 1, in <module> from .mega import Mega # noqa ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega\mega.py", line 18, in <module> from tenacity import retry, wait_exponential, retry_if_exception_type File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\__init__.py", line 451, in <module> from tenacity._asyncio import AsyncRetrying File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\_asyncio.py", line 33, in <module> class AsyncRetrying(BaseRetrying): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\_asyncio.py", line 41, in AsyncRetrying @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
Try to upgrade tenacity
.
pip install --upgrade tenacity
I'm having an issue, when I tried to run the program gives me this error, I tried everything u said in this post: Traceback (most recent call last): File "c:\Users\Administrator\Desktop\saot\pedro.py", line 1, in
from mega.mega import Mega File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega__init.py", line 1, in from .mega import Mega # noqa ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega\mega.py", line 18, in init__.py", line 451, infrom tenacity import retry, wait_exponential, retry_if_exception_type File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\ from tenacity._asyncio import AsyncRetrying File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity_asyncio.py", line 33, in class AsyncRetrying(BaseRetrying): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity_asyncio.py", line 41, in AsyncRetrying @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
For me, it only works with python:3.10.7
.
Any version higher than 3.10.7 causes me the same error.
I'm having an issue, when I tried to run the program gives me this error, I tried everything u said in this post:
Traceback (most recent call last): File "c:\Users\Administrator\Desktop\saot\pedro.py", line 1, in <module> from mega.mega import Mega File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega\__init__.py", line 1, in <module> from .mega import Mega # noqa ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega\mega.py", line 18, in <module> from tenacity import retry, wait_exponential, retry_if_exception_type File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\__init__.py", line 451, in <module> from tenacity._asyncio import AsyncRetrying File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\_asyncio.py", line 33, in <module> class AsyncRetrying(BaseRetrying): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\_asyncio.py", line 41, in AsyncRetrying @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
Try to upgrade
tenacity
.pip install --upgrade tenacity
W Mann Worked God Bles U
Traceback (most recent call last): File "c:\Users\Administrator\Desktop\saot\pedro.py", line 1, in
from mega.mega import Mega File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega__init.py", line 1, in from .mega import Mega # noqa ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mega\mega.py", line 18, in init__.py", line 451, infrom tenacity import retry, wait_exponential, retry_if_exception_type File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity\ from tenacity._asyncio import AsyncRetrying File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity_asyncio.py", line 33, in class AsyncRetrying(BaseRetrying): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity_asyncio.py", line 41, in AsyncRetrying @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
If someone is still facing the coroutine error, I encountered the same error with python 3.11
version specifically, python 3.11.4
, I tried the following code
from mega import Mega
mega = Mega()
email = 'your_emailk@gmail.com'
password = 'your_password'
mega.login(email, password)
I got the same error faced by @addreeh above. But when I switched the python version from python 3.11
to python 3.10
the issues were resolved and the code was working fine. My specific python 3.10
version was python 3.10.11
.
Hope this helps 😊.
I just created a new Ubuntu 20.4.1 VM on Windows 10 / Hyper-V and I ran
pip3 install mega
.When I run
from mega import Mega
in a Python 3.8.2 interpreter I getImportError: cannot import name 'Mega' from 'mega' (/home/dowcet/.local/lib/python3.8/site-packages/mega/__init__.py\
I have confirmed that path
/home/dowcet/.local/lib/python3.8/site-packages/mega/__init__.py
exists, and it contains both__init__.py
andmega.py