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
While trying to listen to events using the Python example: bindings/python/examples/exchange/4_listen_events.py , an error is thrown that account 'Alice' cannot be found whereas, it has been created from a previous example i.e bindings/python/examples/how_tos/accounts_and_addresses/create_account.py. The file create_account.py ran with success.
Furthermore, running python3 /home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/how_tos/accounts_and_addresses/list_accounts.py gives the output:
File "/home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/exchange/4_listen_events.py", line 45, in <module> account = wallet.get_account('Alice')
File "/home/shahid/iota-sdk-wsl/pyiota/lib/python3.10/site-packages/iota_sdk/wallet/wallet.py", line 77, in get_account account_data = self._call_method(
File "/home/shahid/iota-sdk-wsl/pyiota/lib/python3.10/site-packages/iota_sdk/wallet/common.py", line 65, in wrapper raise WalletError(json_response['payload'])
iota_sdk.wallet.common.WalletError: {'type': 'wallet', 'error': 'account "Alice" not found'}
File "/home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/exchange/4_listen_events.py", line 45, in <module> account = wallet.get_account('Alice')
File "/home/shahid/iota-sdk-wsl/pyiota/lib/python3.10/site-packages/iota_sdk/wallet/wallet.py", line 77, in get_account account_data = self._call_method(
File "/home/shahid/iota-sdk-wsl/pyiota/lib/python3.10/site-packages/iota_sdk/wallet/common.py", line 65, in wrapper raise WalletError(json_response['payload'])
iota_sdk.wallet.common.WalletError: {'type': 'wallet', 'error': 'account "Alice" not found'}
Duplicate declaration
I have searched the issues tracker this issue and there is none
The text was updated successfully, but these errors were encountered:
Issue description
While trying to listen to events using the Python example:
bindings/python/examples/exchange/4_listen_events.py
, an error is thrown that account 'Alice' cannot be found whereas, it has been created from a previous example i.ebindings/python/examples/how_tos/accounts_and_addresses/create_account.py
. The filecreate_account.py
ran with success.Furthermore, running
python3 /home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/how_tos/accounts_and_addresses/list_accounts.py
gives the output:AccountMetadata(alias='Alice', coinType=4219, index=0)
.Hence I find it surprising that trying to listen to events gives the error noted earlier.
Version
WSL: Ubuntu 22.04.3 LTS, iota-sdk-python-v2.0.0-beta.1
Expected behaviour
Listen to events with the output given below according to the link :
AccountIndex: 0 Event: { type: 2, output: { outputId: '0x581f43218322d742c0ba1f0d738d6afbc9beaaf4c47f439ab048766b25843f920100', metadata: { blockId: '0x7fdf4079802bd00d022cc382a422491724af6564d31522b7f34133d119b7979d', transactionId: '0x581f43218322d742c0ba1f0d738d6afbc9beaaf4c47f439ab048766b25843f92', outputIndex: 1, isSpent: false, milestoneIndexBooked: 6316391, milestoneTimestampBooked: 1690125643, ledgerIndex: 6450179 }, output: { type: 3, amount: '3043981300', nativeTokens: [Array], unlockConditions: [Array] }, isSpent: false, address: { type: 0, pubKeyHash: '0x194eb32b9b6c61207192c7073562a0b3adf50a7c1f268182b552ec8999380acb' }, networkId: '1856588631910923207', remainder: false, chain: { coinType: 4218, account: 0, change: 0, addressIndex: 0 } } }
Actual behaviour
python3 /home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/exchange/4_listen_events.py
Traceback (most recent call last):
File "/home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/exchange/4_listen_events.py", line 45, in <module> account = wallet.get_account('Alice')
File "/home/shahid/iota-sdk-wsl/pyiota/lib/python3.10/site-packages/iota_sdk/wallet/wallet.py", line 77, in get_account account_data = self._call_method(
File "/home/shahid/iota-sdk-wsl/pyiota/lib/python3.10/site-packages/iota_sdk/wallet/common.py", line 65, in wrapper raise WalletError(json_response['payload'])
iota_sdk.wallet.common.WalletError: {'type': 'wallet', 'error': 'account "Alice" not found'}
Can the issue reliably be reproduced?
Yes
Steps to reproduce the issue
python3 /home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/exchange/4_listen_events.py
Errors
/home/shahid/iota-sdk-wsl/pyiota/bin/python /home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/exchange/4_listen_events.py
Traceback (most recent call last):
File "/home/shahid/iota-sdk-wsl/iota-sdk/bindings/python/examples/exchange/4_listen_events.py", line 45, in <module> account = wallet.get_account('Alice')
File "/home/shahid/iota-sdk-wsl/pyiota/lib/python3.10/site-packages/iota_sdk/wallet/wallet.py", line 77, in get_account account_data = self._call_method(
File "/home/shahid/iota-sdk-wsl/pyiota/lib/python3.10/site-packages/iota_sdk/wallet/common.py", line 65, in wrapper raise WalletError(json_response['payload'])
iota_sdk.wallet.common.WalletError: {'type': 'wallet', 'error': 'account "Alice" not found'}
Duplicate declaration
The text was updated successfully, but these errors were encountered: