For s in signed_hextx.split('80a0'): AttributeError: 'dict' object has no attribute 'split'

Hi, I am currently working on my college project where I am using blockcerts on ethereum_ropsten network. After all the configuration, when I try to issue the cerificate it throws AttributeError: ‘dict’ object has no attribute ‘split’. When I dug down a bit more into the code, i found that there were no commands regarding conversion of signed_tx to signed_hextx. Can that be a reason for the error. Any help is appriciated.

Thanks in advance.
-Gaurav

Do you have a stack trace and complete log that you could share? I haven’t seen this error myself with ethereum.

Hi @aronning, sorry for responding late, my semester exams are going on :frowning: , here’s the complete log which I get in my terminal:

WARNING - Your app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - This run will try to issue on the ethereum_ropsten chain
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Processing 1 certificates
INFO - Processing 1 certificates
INFO - Processing 1 certificates under work path=/etc/cert-issuer/work
INFO - Processing 1 certificates under work path=/etc/cert-issuer/work
INFO - Balance check succeeded: {'status': '1', 'message': 'OK', 'result': '1000000000000000000'}
INFO - Balance check succeeded: {'status': '1', 'message': 'OK', 'result': '1000000000000000000'}
INFO - Total cost will be 500000000000000 wei
INFO - Total cost will be 500000000000000 wei
INFO - Starting finalizable signer
INFO - Starting finalizable signer
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - Stopping finalizable signer
INFO - Stopping finalizable signer
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - here is the op_return_code data: c65c6184e3d5a945ddb5437e93ea312411fd33aa1def22b0746d6ecd4aa30f20
INFO - here is the op_return_code data: c65c6184e3d5a945ddb5437e93ea312411fd33aa1def22b0746d6ecd4aa30f20
INFO - Nonce check went correct: {'jsonrpc': '2.0', 'result': '0x0', 'id': 1}
INFO - Nonce check went correct: {'jsonrpc': '2.0', 'result': '0x0', 'id': 1}
INFO - Starting finalizable signer
INFO - Starting finalizable signer
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - Stopping finalizable signer
INFO - Stopping finalizable signer
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - signed Ethereum trx = {'error': True, 'message': AttributeError("can't set attribute",)}
INFO - signed Ethereum trx = {'error': True, 'message': AttributeError("can't set attribute",)}
INFO - verifying ethDataField value for transaction
INFO - verifying ethDataField value for transaction
Traceback (most recent call last):
  File "/usr/local/bin/cert-issuer", line 11, in <module>
sys.exit(cert_issuer_main())
  File "/usr/local/lib/python3.6/dist-packages/cert_issuer/__main__.py", line 17, in cert_issuer_main
issue_certificates.main(parsed_config)
  File "/usr/local/lib/python3.6/dist-packages/cert_issuer/issue_certificates.py", line 36, in main
return issue(app_config, certificate_batch_handler, transaction_handler)
  File "/usr/local/lib/python3.6/dist-packages/cert_issuer/issue_certificates.py", line 22, in issue
tx_id = issuer.issue(app_config.chain)
  File "/usr/local/lib/python3.6/dist-packages/cert_issuer/issuer.py", line 27, in issue
txid = self.transaction_handler.issue_transaction(blockchain_bytes)
  File "/usr/local/lib/python3.6/dist-packages/cert_issuer/blockchain_handlers/ethereum/transaction_handlers.py", line 61, in issue_transaction
self.verify_transaction(signed_tx, eth_data_field)
  File "/usr/local/lib/python3.6/dist-packages/cert_issuer/blockchain_handlers/ethereum/transaction_handlers.py", line 92, in verify_transaction
tx_utils.verify_eth_transaction(signed_tx, eth_data_field)
  File "/usr/local/lib/python3.6/dist-packages/cert_issuer/blockchain_handlers/ethereum/tx_utils.py", line 24, in verify_eth_transaction
for s in signed_hextx.split('80a0'):
AttributeError: 'dict' object has no attribute 'split'

So it looks like this is the real reason for the error. The signed transaction had a problem getting generated correctly (and no error handling here) which causes the verifying ethDataField value for transaction to throw an error later on.

I’ve never seen this error before, wonder what could be wrong generating the transaction. Would you mind posting your config file?

Hi,
I have the same error. Here’s my config file:
issuing_address = 0x2bF81856b6d2243Ed85bA2b937adAFB21341556C

chain = ethereum_ropsten

usb_name=/Users/jenilthakker/Desktop/Coding/blockchain-certificate/ethereum

key_file=pk

put your unsigned certificates here for signing. Default is /data/unsigned_certificates

unsigned_certificates_dir=/Users/jenilthakker/Desktop/Coding/cert-issuer/data/unsigned_certificates

final blockchain certificates output. Default is /data/unsigned_certificates

blockchain_certificates_dir=/Users/jenilthakker/Desktop/Coding/cert-issuer/data/blockchain_certificates

where to store intermediate files, for debugging and checkpointing. Default is /data/work

work_dir=/Users/jenilthakker/Desktop/Coding/cert-issuer/data/work

no_safe_mode

Are you using the default certificates to test out or did you create/edit your own?

Anyone found the solution, I’m still facing the same issue?

I’m facing the same issue, tried both with the default certificates and also with my own certificated (edit the example certificates and put my own key).
Here’s my TraceBack:

Traceback (most recent call last):
File “/Users/abdul/PycharmProjects/cert-issuer/venv/bin/cert-issuer”, line 11, in
load_entry_point(‘cert-issuer==2.0.22’, ‘console_scripts’, ‘cert-issuer’)()
File “/Users/abdul/PycharmProjects/cert-issuer/venv/lib/python3.5/site-packages/cert_issuer-2.0.22-py3.5.egg/cert_issuer/ main .py”, line 17, in cert_issuer_main
issue_certificates.main(parsed_config)
File “/Users/abdul/PycharmProjects/cert-issuer/venv/lib/python3.5/site-packages/cert_issuer-2.0.22-py3.5.egg/cert_issuer/issue_certificates.py”, line 36, in main
return issue(app_config, certificate_batch_handler, transaction_handler)
File “/Users/abdul/PycharmProjects/cert-issuer/venv/lib/python3.5/site-packages/cert_issuer-2.0.22-py3.5.egg/cert_issuer/issue_certificates.py”, line 22, in issue
tx_id = issuer.issue(app_config.chain)
File “/Users/abdul/PycharmProjects/cert-issuer/venv/lib/python3.5/site-packages/cert_issuer-2.0.22-py3.5.egg/cert_issuer/issuer.py”, line 27, in issue
txid = self.transaction_handler.issue_transaction(blockchain_bytes)
File “/Users/abdul/PycharmProjects/cert-issuer/venv/lib/python3.5/site-packages/cert_issuer-2.0.22-py3.5.egg/cert_issuer/blockchain_handlers/ethereum/transaction_handlers.py”, line 61, in issue_transaction
self.verify_transaction(signed_tx, eth_data_field)
File “/Users/abdul/PycharmProjects/cert-issuer/venv/lib/python3.5/site-packages/cert_issuer-2.0.22-py3.5.egg/cert_issuer/blockchain_handlers/ethereum/transaction_handlers.py”, line 92, in verify_transaction
tx_utils.verify_eth_transaction(signed_tx, eth_data_field)
File “/Users/abdul/PycharmProjects/cert-issuer/venv/lib/python3.5/site-packages/cert_issuer-2.0.22-py3.5.egg/cert_issuer/blockchain_handlers/ethereum/tx_utils.py”, line 24, in verify_eth_transaction
for s in signed_hextx.split(‘80a0’):
AttributeError: ‘dict’ object has no attribute 'split’

The AttributeError is an exception thrown when an object does not have the attribute you tried to access. ‘dict’ object has no attribute ‘split’ error is that you’re trying to call python split function on the dict , and you can’t split dict elements, only a string. The string consists of a sequence of comma-separated bindings.

hi there, any update on this. did anybody resolved this?

It also outputs some HTML content that says: