Commvault / cvpysdk

Developer SDK - Python
https://commvault.github.io/cvpysdk/
Apache License 2.0
54 stars 41 forks source link

encoded = binascii.b2a_base64(s, newline=False) #42

Closed Anu-26 closed 6 years ago

Anu-26 commented 6 years ago

Hi

I am using version SP10 cvpysdk and getting below error while adding disk library.

[root@CentOS68_base ~]# python3 Python 3.6.5 (default, Apr 10 2018, 16:33:12) [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux Type "help", "copyright", "credits" or "license" for more information.

from cvpysdk.commcell import Commcell; commcell = Commcell('10.207.84.161', 'Administrator', 'Password123!'); from cvpysdk import storage; from cvpysdk.storage import *; commcell.disk_libraries.add(library_name="testlib2", media_agent="windows2012r2", mount_path="C:\test2", username="Administrator", password="Password123!") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/site-packages/cvpysdk-1.0.0-py3.6.egg/cvpysdk/storage.py", line 550, in add "password": b64encode(password), File "/usr/lib/python3.6/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str'

GoelJatin commented 6 years ago

Hi Anu,

This is something we must've missed while adding support for Python 3.

Thanks for pointing this out.

We'll fix this soon and update you.

GoelJatin commented 6 years ago

Hi Anu,

I've made the fix and pushed to the SP10 tree.

Closing the issue!