Hello,
I´m trying to decryped my RAIDz1-0 Volume over shell with this code:
And get the fallowing error message:
Does anybody has a clue why its not working?
I´m using FreeNAS 11.1-RELEASE
I´m trying to decryped my RAIDz1-0 Volume over shell with this code:
Code:
#!/usr/bin/env python
#import json
#import requests
import json
import requests
r = requests.post(
'https://192.168.10.100/api/v1.0/storage/volume/Raid5.5.45.TB/unlock/',
auth=('root', '123456'),
headers={'Content-Type': 'application/json'},
verify=False,
data=json.dumps({'123456'})
)
print (r.text)
And get the fallowing error message:
Code:
Traceback (most recent call last):
File "./unlock.py", line 14, in <module>
data=json.dumps({'123456'})
File "/usr/lib64/python2.7/json/__init__.py", line 244, in dumps
return _default_encoder.encode(obj)
File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
File "/usr/lib64/python2.7/json/encoder.py", line 184, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: set(['123456']) is not JSON serializable
Does anybody has a clue why its not working?
I´m using FreeNAS 11.1-RELEASE
Last edited: