lzzy12 / python-aria-mirror-bot

A telegram bot for all your mirror needs | OG Repo
https://t.me/pythonmirrorsupport
GNU General Public License v3.0
736 stars 1.3k forks source link

Arm architecture unsupported #251

Closed ghost closed 2 years ago

ghost commented 2 years ago

When running this 'sudo docker run mirror-bot' on an arm CPU:


  File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/usr/src/app/bot/__init__.py", line 92, in <module>
    subprocess.Popen(["megasdkrest", "--apikey", MEGA_KEY])
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'megasdkrest'
Exception ignored in: <function ClientSession.__del__ at 0xffffa76e6280>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client.py", line 337, in __del__
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1740, in call_exception_handler
  File "/usr/lib/python3.8/logging/__init__.py", line 1475, in error
  File "/usr/lib/python3.8/logging/__init__.py", line 1589, in _log
  File "/usr/lib/python3.8/logging/__init__.py", line 1599, in handle
  File "/usr/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
  File "/usr/lib/python3.8/logging/__init__.py", line 954, in handle
  File "/usr/lib/python3.8/logging/__init__.py", line 1186, in emit
  File "/usr/lib/python3.8/logging/__init__.py", line 1176, in _open
NameError: name 'open' is not defined```
ksauraj commented 2 years ago

Check Issue Here

Cherry-pick commit and try.

ProjectPhoenixX commented 2 years ago

I'm also left with the same error . How to fix this ?

lzzy12 commented 2 years ago

I'm also left with the same error . How to fix this ?

The megarestsdk only have x86-64 binaries. Hence it is unable to run on arm processors. We will add arm binaries soon

lzzy12 commented 2 years ago

This is fixed in https://github.com/lzzy12/python-aria-mirror-bot/commit/9f60efc04af9a7f2495684ebbf0fbc74c4bd39b6