FlorianREGAZ / Python-Tls-Client

Advanced HTTP Library
MIT License
679 stars 135 forks source link

32-bit support #14

Closed acheong08 closed 1 year ago

acheong08 commented 1 year ago

Error in 32bit Python

Traceback (most recent call last):
  File "E:\python\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "E:\python\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "E:\python\lib\site-packages\revChatGPT\__main__.py", line 1, in <module>
    from revChatGPT.revChatGPT import Chatbot
  File "E:\python\lib\site-packages\revChatGPT\revChatGPT.py", line 4, in <module>
    import tls_client
  File "E:\python\lib\site-packages\tls_client\__init__.py", line 15, in <module>
    from .sessions import Session
  File "E:\python\lib\site-packages\tls_client\sessions.py", line 1, in <module>
    from .cffi import request
  File "E:\python\lib\site-packages\tls_client\cffi.py", line 15, in <module>
    library = ctypes.cdll.LoadLibrary(f'{root_dir}/dependencies/tls-client{file_ext}')
  File "E:\python\lib\ctypes\__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "E:\python\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 Is not a valid Win32 application.

https://github.com/acheong08/ChatGPT/issues/74

aduil commented 1 year ago

I met the same issue, and to solve it, I temporarily replaced the dll file to https://github.com/bogdanfinn/tls-client/blob/master/cffi_dist/dist/tls-client-windows-32-1.0.0.dll

FlorianREGAZ commented 1 year ago

Hey should be fixed with the newest version :)