toPublish = []
toPublish.append({'for':streamName, 'key':key, 'data':hexData})
publishCommand = [multichainLoc+'multichain-cli', str('{}'.format(chainName)),'createrawsendfrom', addr, '{}' ,str('{}'.format(toPublish)), 'send']
#supress output of the command
try:
dummy = subprocess.check_output(publishCommand, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
print(e.returncode)
print(e.output)
error:
b'[\n "1D8TuBS6AkmsDx9fyJWm6A3LkHSCWYaisLt7q7"\n]\n'
address: 1D8TuBS6AkmsDx9fyJWm6A3LkHSCWYaisLt7q7
Traceback (most recent call last):
File "storeFilex.py", line 187, in <module>
storeFile(argv[1], filePath)
File "storeFilex.py", line 67, in storeFile
dummy = subprocess.check_output(publishCommand, stderr=subprocess.STDOUT)
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: ' multichain-cli'