Skip to content

Error: libsecp256k1.so.0 missing and TonLib attribute issue in pytonlib #65

@enavid

Description

@enavid

Hello,

I'm using pytonlib in my Django project running on Ubuntu. I’ve encountered the following issue during runtime:

‍{'msg': 'libsecp256k1.so.0: cannot open shared object file: No such file or directory', 'method': 'deposit'}
Exception in tonlibjson.__del__: Traceback (most recent call last):
  File "/path/to/venv/lib/python3.12/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 0x72e2b810da80>
Traceback (most recent call last):
  File "/path/to/venv/lib/python3.12/site-packages/pytonlib/tonlibjson.py", line 136, in __del__
    raise RuntimeError(f'Error in tonlibjson.__del__: {ee}')
RuntimeError: Error in tonlibjson.__del__: 'TonLib' object has no attribute '_tonlib_json_client_destroy'

Steps I’ve taken:
1- Installed libsecp256k1-dev via sudo apt-get install libsecp256k1-dev.
2- Verified that libsecp256k1.so.0 is installed correctly using ldconfig -p | grep libsecp256k1.

My setup:
1-Ubuntu
2- Django 5
3- Python 3.12

I ask this question in stackoverflow(https://stackoverflow.com/questions/78981384/error-libsecp256k1-so-0-cannot-open-shared-object-file-with-pytonlib-on-ubun)

It looks like the issue might be related to the TonLib class, specifically the missing _tonlib_json_client_destroy attribute.

Could you provide any guidance on how to fix this or if there’s a missing step in the setup?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions