Skip to main content
Question

SSL Certificate Verify Failed


crowleyb
Contributor
Forum|alt.badge.img+4

Hello:

I created a workspace with a python caller to access a Zoom api endpoint. I copied the same python code from Zoom's code generator and the code runs fine. I copy the same code into a python caller and I receive the following errors. I have no proxy I am going through. I have very limited python experience. Any help would be appreciated.

Errors:

Python Exception <SSLCertVerificationError>: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)

Error executing string `import<space>http.client<lf>import<space>fme<lf>import<space>fmeobjects<lf>#<space>Template...

Factory proxy not initialized

PythonCaller (PythonFactory): PythonFactory failed to process feature

Code:

import http.client

import fme

import fmeobjects

# Template Function interface:

# When using this function, make sure its name is set as the value of

# the 'Class or Function to Process Features' transformer parameter

def processFeature(feature):

pass

 

# Template Class Interface:

# When using this class, make sure its name is set as the value of

# the 'Class or Function to Process Features' transformer parameter

class FeatureProcessor(object):

def __init__(self):

pass

def input(self,feature):

self.pyoutput(feature)

def close(self):

pass

 

conn = http.client.HTTPSConnection("api.zoom.us")

 

headers = { 'authorization' : "Bearer [some value]" }

 

conn.request("GET", "/v2/users?page_number=1&page_size=30&status=active", headers=headers)

 

res = conn.getresponse()

data = res.read()

 

print(data.decode("utf-8"))

4 replies

david_r
Evangelist
  • May 7, 2020

This would be better suited for either a Python or a Zoom API forum as it has very little to do with FME, but try replacing this line:

conn = http.client.HTTPSConnection("api.zoom.us"

with this (all on one line):

conn = http.client.HTTPSConnection("api.zoom.us", context = ssl._create_unverified_context())

You'll probably need to add "import ssl" at the top of the script as well.

See: https://stackoverflow.com/a/50949266


crowleyb
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • May 7, 2020

Thank you! I appreciate the assistance. I'm very new to python so I wasn't sure if the issue was FME given I'm using an PythonCaller in my workspace to run this. A thousand pardons for posting this in an FME forum.

 


david_r
Evangelist
  • May 8, 2020
crowleyb wrote:

Thank you! I appreciate the assistance. I'm very new to python so I wasn't sure if the issue was FME given I'm using an PythonCaller in my workspace to run this. A thousand pardons for posting this in an FME forum.

 

No worries. Does this mean that the modification worked?


crowleyb
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • May 8, 2020
crowleyb wrote:

Thank you! I appreciate the assistance. I'm very new to python so I wasn't sure if the issue was FME given I'm using an PythonCaller in my workspace to run this. A thousand pardons for posting this in an FME forum.

 

Yes. the modification worked


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings