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
importasynciofrompytoniqimportLiteClientasyncdefmain():
client=LiteClient.from_mainnet_config( # choose mainnet, testnet or custom config dictls_i=0, # index of liteserver from configtrust_level=0, # trust level to liteservertimeout=15# timeout not includes key blocks synchronization as it works in pytonlib
)
awaitclient.connect()
if__name__=='__main__':
asyncio.run(main())
With some probability I get:
Traceback (most recent call last):
File "<rootPath>/pytoniq_test.py", line 44, 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>/pytoniq_test.py", line 13, in main
await client.connect()
File "<rootPath>/.venv/lib/python3.11/site-packages/pytoniq/liteclient/client.py", line 190, in connect
await self.update_last_blocks()
File "<rootPath>/.venv/lib/python3.11/site-packages/pytoniq/liteclient/client.py", line 310, in update_last_blocks
self.last_mc_block = await self.get_trusted_last_mc_block()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<rootPath>/.venv/lib/python3.11/site-packages/pytoniq/liteclient/client.py", line 306, in get_trusted_last_mc_block
await self.get_mc_block_proof(known_block=self.last_key_block, target_block=last_block)
File "<rootPath>/.venv/lib/python3.11/site-packages/pytoniq/liteclient/client.py", line 982, in get_mc_block_proof
while last_proved != target_block:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<rootPath>/.venv/lib/python3.11/site-packages/pytoniq_core/tl/block.py", line 66, in __eq__
if self.seqno != other.seqno or self.workchain != other.workchain or self.shard != other.shard or self.root_hash != other.root_hash or self.file_hash != other.file_hash:
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'seqno'
The text was updated successfully, but these errors were encountered:
pytoniq 0.1.39
python 3.11
With some probability I get:
The text was updated successfully, but these errors were encountered: