I am trying to fetch bundles from the Tangle based on their tail transaction hashes. I am trying to follow step 7 of the Pyota Tutorial
I successfully encrypted data and included it in a zero-value transaction as described in step 6. The transaction is visible in the Tangle Explorer and a nice green Confirmed tag is associated with it.
Unfortunately when I run the script and insert the Tail transaction hash of the bundle I get the following error:
Looking for bundle on the Tangle...
Traceback (most recent call last):
File "read_encrypted_transaction.py", line 21, in <module>
bundle = api.get_bundles([tail_hash])['bundles'][0]
File "/home/userk/development/git/autodichiarazione_2.0/consistency_check/environ/lib/python3.6/site-packages/iota/api.py", line 721, in get_bundles
return extended.GetBundlesCommand(self.adapter)(transaction=transaction)
File "/home/userk/development/git/autodichiarazione_2.0/consistency_check/environ/lib/python3.6/site-packages/iota/commands/__init__.py", line 126, in __call__
replacement = self._prepare_request(self.request)
File "/home/userk/development/git/autodichiarazione_2.0/consistency_check/environ/lib/python3.6/site-packages/iota/commands/__init__.py", line 300, in _prepare_request
failure_message = 'Request failed validation',
File "/home/userk/development/git/autodichiarazione_2.0/consistency_check/environ/lib/python3.6/site-packages/iota/commands/__init__.py", line 335, in _apply_filter
'filter_errors': runner.get_errors(with_context=True),
ValueError: Request failed validation ({'transaction': ['wrong_type']}) (`exc.context["filter_errors"]` contains more information).
What am I missing?
EDIT Here is the complete exception info:
Looking for bundle on the Tangle...
{'filter_errors': {'transaction': [{'code': 'wrong_type',
'context': {'code': 'wrong_type',
'filter': 'Type(TryteString, '
'bytearray, bytes, '
'str, '
'allow_subclass=True)',
'key': 'transaction',
'replacement': None,
'value': ['QEZGSZYP9FXJZJIZQJILXGMIMMFQXGFGP9NOGDJJV9PAWJRYLTACOICVKOPYUVVCTNPFDJUTQPAJMI999']},
'exc_info': None,
'message': 'list is not valid (allowed '
'types: TryteString, bytearray, '
'bytes, str).'}]}}
Additional Infos
pip show pyota
Name: PyOTA
Version: 2.1.0
Summary: IOTA API library for Python
Home-page: https://github.com/iotaledger/iota.py
Author: Phoenix Zerin
Author-email: [email protected]
License: MIT
Location: /home/userk/development/git/autodichiarazione_2.0/consistency_check/environ/lib/python3.6/site-packages
Requires: pysha3, requests, six, phx-filters