2023-10-05 08:40:24,282 __main__ - INFO:zip created successfully
2023-10-05 08:40:24,361 __main__ - INFO:Response: <Response [200]>
2023-10-05 08:40:24,361 __main__ - INFO:password update is successful
2023-10-05 08:40:24,361 __main__ - INFO:in inventory operation
2023-10-05 08:40:24,362 __main__ - INFO:invoking bulk operation
2023-10-05 08:40:24,362 __main__ - ERROR:Exception while running bootstrap script
Traceback (most recent call last):
File "/var/lib/vrlcm/insert.py", line 429, in <module>
inventoryoperation(sys.argv[1],sys.argv[2])
File "/var/lib/vrlcm/insert.py", line 153, in inventoryoperation
postbulkfunction (hostname+str(inventory_data['url']),scriptpath+str(inventory_data['file']),scriptpath,str(inventory_data['url'])+str(inventory_data['file']) )
File "/var/lib/vrlcm/insert.py", line 94, in postbulkfunction
if postcall(url,contents) :
File "/var/lib/vrlcm/insert.py", line 30, in postcall
b64Val = base64.b64encode(usrPass)
File "/usr/lib/python3.7/base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'
2023-10-05 08:40:24,363 __main__ - INFO:file removed /var/lib/vrlcm/INPROGRESS
Note: Please revert to the snapshot and perform the below workaround.
Workaround:
unlink /usr/bin/python
ln -sf /usr/bin/python2 /usr/bin/python
python -c 'import platform; print(platform.python_version())'