Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Not supported on armv7l/raspberrypi #138

Open
duckida opened this issue Jul 1, 2023 · 4 comments
Open

Not supported on armv7l/raspberrypi #138

duckida opened this issue Jul 1, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@duckida
Copy link

duckida commented Jul 1, 2023

When I try sending a message from a Raspberry Pi using Python, I receive the following error:

File "poetest.py", line 1, in <module>
import poe
  File "/home/pi/.local/lib/python3.7/site-packages/poe.py", line 3, in <module>
    import tls_client as requests_tls
  File "/home/pi/.local/lib/python3.7/site-packages/tls_client/__init__.py", line 15, in <module>
    from .sessions import Session
  File "/home/pi/.local/lib/python3.7/site-packages/tls_client/sessions.py", line 1, in <module>
    from .cffi import request, freeMemory
  File "/home/pi/.local/lib/python3.7/site-packages/tls_client/cffi.py", line 20, in <module>
    library = ctypes.cdll.LoadLibrary(f'{root_dir}/dependencies/tls-client{file_ext}')
  File "/usr/lib/python3.7/ctypes/__init__.py", line 434, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/pi/.local/lib/python3.7/site-packages/tls_client/dependencies/tls-client-amd64.so: wrong ELF class: ELFCLASS64

It seems a dependency is designed only for amd64 architecture, and so it will not work on armbased devices. Does anyone know how to patch this or have another API I could use, as this may also be a problem for M1/2 arm based Macs.?

@ading2210
Copy link
Owner

This is likely an issue with the tls-client package which doesn't seem to be compiled for ARM. Raise an issue there or compile it yourself.

@ading2210 ading2210 added the bug Something isn't working label Jul 1, 2023
@ichuixue
Copy link

ichuixue commented Jul 2, 2023

Here is a workaround. In the poe.py file, change
import tls_client as requests_tls
to
import request as requests_tls

@acheong08
Copy link
Contributor

Here is a workaround. In the poe.py file, change import tls_client as requests_tls to import request as requests_tls

Might get you banned if they detect bot usage

@duckida
Copy link
Author

duckida commented Jul 8, 2023

I managed to download tls-client using someone's GIT repositiry on the Pi and that was the arm7l version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants