You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first example from the documentation leads to an error. RuntimeError: Error in tonlibjson.__del__: 'TonLib' object has no attribute '_tonlib_json_client_destroy'
#63
Open
QuisEgoSum opened this issue
Jul 23, 2024
· 4 comments
importrequestsimportasynciofrompathlibimportPathfrompytonlibimportTonlibClientasyncdefmain():
# downloading mainnet configton_config=requests.get('https://ton.org/global.config.json').json()
# create keystore directory for tonlibkeystore_dir='/tmp/ton_keystore'Path(keystore_dir).mkdir(parents=True, exist_ok=True)
# init TonlibClientclient=TonlibClient(ls_index=0, # choose LiteServer index to connectconfig=ton_config,
keystore=keystore_dir)
# init tonlibjsonawaitclient.init()
if__name__=='__main__':
asyncio.run(main())
Traceback (most recent call last):
File "<rootPath>/main.py", line 26, in <module>
asyncio.run(main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "<rootPath>/main.py", line 22, in main
await client.init()
File "<rootPath>/.venv/lib/python3.11/site-packages/pytonlib/client.py", line 71, in init
wrapper = TonLib(event_loop, self.ls_index, self.cdll_path, self.verbosity_level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<rootPath>/.venv/lib/python3.11/site-packages/pytonlib/tonlibjson.py", line 81, in __init__
tonlib = CDLL(cdll_path)
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/ctypes/__init__.py", line 376, in __init__
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libsecp256k1.so.0: cannot open shared object file: No such file or directory
Exception in tonlibjson.__del__: Traceback (most recent call last):
File "<rootPath>/.venv/lib/python3.11/site-packages/pytonlib/tonlibjson.py", line 133, in __del__
self._tonlib_json_client_destroy(self._client)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TonLib' object has no attribute '_tonlib_json_client_destroy'
Exception ignored in: <function TonLib.__del__ at 0x7f50ba77cd60>
Traceback (most recent call last):
File "<rootPath>/.venv/lib/python3.11/site-packages/pytonlib/tonlibjson.py", line 136, in __del__
RuntimeError: Error in tonlibjson.__del__: 'TonLib' object has no attribute '_tonlib_json_client_destroy'
The text was updated successfully, but these errors were encountered:
Had the same issue, while deploying my application on a Ubuntu 22.04 server. To ensure that pytonlib works, you have to make sure you are using SSL 1.1.1. The first comment in this problem says how to install it.
For reference: it is stated in one of the pytonlib dev's videos in the comments, so you might as well find something helpful there.
pytonlib 0.0.63
python 3.11
The text was updated successfully, but these errors were encountered: