Anaplan API 2.0 Python Library Certificate Error

forestsummers
New Contributor

Anaplan API 2.0 Python Library Certificate Error

Hi,

 

We are trying to change from basic authentication to using a certificate.  I am using the Anaplan API 2.0 Python Library.

 

When running AnaplanConnection function I am getting the following error that I traced to the anaplan_auth.py. 

 

TypeError: from_buffer() cannot return the address of a unicode object

 

I have tried troubleshooting, but I have not been able to come up with any solutions.  Has anyone else had this issue?

 

It comes from this line of code:

key = serialization.load_pem_private_key(privKey, None, backend=backend)

 

 

 

 

 

 

2 REPLIES 2
JaredDolich
Moderator

Re: Anaplan API 2.0 Python Library Certificate Error

@forestsummers 

Good job moving to a certificate. That's the best way. Two suggestions for you.

  • Make sure you have a private CA Certficate for an email address, called an “S/MIME Certificate” or an “email Certificate”. There are many types out there but you need one that can be associated with the email address you're using.
  • Read @chase.hippen most excellent article with examples on how to use certificates with Python.

Jared Dolich
forestsummers
New Contributor

Re: Anaplan API 2.0 Python Library Certificate Error

Hi Jared,

 

Thanks for helping, and for the resource.  I have not solved the issue, but maybe there is something I am missing.