question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

safe events task - string indices must be integers

See original GitHub issue

Describe the bug Is this a known issue? Transaction with which a safe was created on L2 Boba Network (optimistic rollups) https://blockexplorer.boba.network/tx/0xc2c9b597c49238d05c2e18ae6ac72b45f0fc16989cf04a27ed923ada06dfad69/internal-transactions

boba_ops-worker-1                          | 2021-12-21 15:20:06,790 [INFO] [a64c0933/index_safe_events_task] SafeEventsIndexer: Found 2 events from block-number=252954 to block-number=252965 for 1 addresses: ['0xfb1bffC9d739B8D520DaF37dF666da4C687191EA']
boba_ops-worker-1                          | 2021-12-21 15:20:06,874 [INFO] [2b290610/index_new_proxies_task] ProxyFactoryIndexer: Processing 1 almost updated addresses
boba_ops-worker-1                          | 2021-12-21 15:20:06,948 [ERROR] [a64c0933/index_safe_events_task] Task safe_transaction_service.history.tasks.index_safe_events_task[a64c0933-add0-4672-ae46-7f692655ec6f] raised unexpected: TypeError('string indices must be integers')
boba_ops-worker-1                          | Traceback (most recent call last):
boba_ops-worker-1                          |   File "/usr/local/lib/python3.9/site-packages/celery/app/trace.py", line 451, in trace_task
boba_ops-worker-1                          |     R = retval = fun(*args, **kwargs)
boba_ops-worker-1                          |   File "/usr/local/lib/python3.9/site-packages/celery/app/trace.py", line 734, in __protected_call__
boba_ops-worker-1                          |     return self.run(*args, **kwargs)
boba_ops-worker-1                          |   File "/usr/local/lib/python3.9/site-packages/celery/app/autoretry.py", line 34, in run
boba_ops-worker-1                          |     return task._orig_run(*args, **kwargs)
boba_ops-worker-1                          |   File "/app/safe_transaction_service/history/tasks.py", line 174, in index_safe_events_task
boba_ops-worker-1                          |     number = SafeEventsIndexerProvider().start()
boba_ops-worker-1                          |   File "/app/safe_transaction_service/history/indexers/ethereum_indexer.py", line 383, in start
boba_ops-worker-1                          |     processed_elements, updated = self.process_addresses(
boba_ops-worker-1                          |   File "/app/safe_transaction_service/history/indexers/ethereum_indexer.py", line 341, in process_addresses
boba_ops-worker-1                          |     processed_elements = self.process_elements(elements)
boba_ops-worker-1                          |   File "/app/safe_transaction_service/history/indexers/events_indexer.py", line 206, in process_elements
boba_ops-worker-1                          |     self.index_service.txs_create_or_update_from_tx_hashes(tx_hashes)
boba_ops-worker-1                          |   File "/app/safe_transaction_service/history/services/index_service.py", line 134, in txs_create_or_update_from_tx_hashes
boba_ops-worker-1                          |     self.ethereum_client.get_transaction_receipts(tx_hashes_not_in_db),
boba_ops-worker-1                          |   File "/usr/local/lib/python3.9/site-packages/gnosis/eth/ethereum_client.py", line 1656, in get_transaction_receipts
boba_ops-worker-1                          |     for result in sorted(results, key=lambda x: x["id"]):
boba_ops-worker-1                          |   File "/usr/local/lib/python3.9/site-packages/gnosis/eth/ethereum_client.py", line 1656, in <lambda>
boba_ops-worker-1                          |     for result in sorted(results, key=lambda x: x["id"]):
boba_ops-worker-1                          | TypeError: string indices must be integers
boba_ops-worker-1                          | 2021-12-21 15:20:07,024 [INFO] [2b290610/index_new_proxies_task] ProxyFactoryIndexer: Found 1 events from block-number=252954 to block-number=252965 for 1 addresses: ['0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC']

To Reproduce Creating a safe with 1 owner.

Expected behavior A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • production mainnet
  • Boba Network
  • OSX
  • Brave
  • 7ee78f9f80de1b25a1301d8c92c6430e0ef008ea 3.4.17

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Uxio0commented, Dec 22, 2021

Nice, I’m glad it’s fixed

1reaction
Uxio0commented, Dec 21, 2021

It’s not a known issue. Looks like a problem of the node when getting transaction receipts

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python typeerror: string indices must be integers Solution
String indices must be integers. This means that when you're accessing an iterable object like a string, you must do it using a...
Read more >
Why am I seeing "TypeError: string indices must be integers"?
Long Answer. When working with strings and slice notation (a common sequence operation), it can happen that a TypeError is raised, pointing out ......
Read more >
String indices must be integers: How to solve this python ...
In conclusion, string indices must be integers. This means that when you're accessing an iterable object like a string, you must do it...
Read more >
TypeError String Indices Must be Integers Python Error [Solved]
If you encounter this error message, double check to make sure you are using the numerical index value to access elements instead of...
Read more >
PYTHON TYPE ERROR: STRING INDICES MUST BE ...
In Python, iterable objects are indexed or placed in the data structures such as string or dictionary using numbers i.e. integer. When values...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found