Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a odd error #54

Open
Dark-horse-007 opened this issue Feb 6, 2024 · 1 comment
Open

I have a odd error #54

Dark-horse-007 opened this issue Feb 6, 2024 · 1 comment

Comments

@Dark-horse-007
Copy link

Code:

from ton.sync import TonlibClient
client = TonlibClient()
TonlibClient.enable_unaudited_binaries()
client.init_tonlib()
seed = "24 security phrases"
wallet = client.import_wallet(seed)
balance = client.from_nano(wallet.get_balance())
print(balance)

error:

Traceback (most recent call last):
  File "test", line 13, in <module>
    print(wallet.get_balance())
  File "/usr/local/lib/python3.8/dist-packages/ton/sync.py", line 19, in syncified
    return loop.run_until_complete(coro)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.8/dist-packages/ton/account/state_methods.py", line 24, in get_balance
    (await self.get_state(force=True, **kwargs)).balance  # nanoTONs
  File "/usr/local/lib/python3.8/dist-packages/ton/account/state_methods.py", line 14, in get_state
    await self.load_state(**kwargs)
  File "/usr/local/lib/python3.8/dist-packages/ton/account/state_methods.py", line 8, in load_state
    self.state = await self.client.tonlib_wrapper.execute(
  File "/usr/local/lib/python3.8/dist-packages/ton/tonlibjson.py", line 175, in execute
    result = await self._execute(query, timeout=timeout)
ton.tonlibjson.TonlibError: LITE_SERVER_UNKNOWN: timeout(during last block synchronization)

I'm running this on a DigitalOcean server so my internet isn't a problem

@xurvan
Copy link

xurvan commented May 2, 2024

I ran into a similar issue myself, and it turned out to be related to "ls_index." Maybe this could help you too!

client = TonlibClient(ls_index=2)

I think you can check this post too: https://stackoverflow.com/questions/77961843/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants