Help with multipart-formdata - Python Requests code

Hi,
When I create a form-data POST request with two images, the Postman Request works.
However when I select the code for Python - Requests the generated code does not work at all.
It’s looking for the boundary markers…
Is there a way to see the full code that Postman generates that succeeds ?
Thanks,
Brian

import requests

url = “https://face-recognition4.p.rapidapi.com/FaceVerification”

payload = {}

files = [

(‘photo1’, open(’/C:/Users/bbourgault/Pictures/bb.jpg’,‘rb’)),

(‘photo2’, open(’/C:/Users/bbourgault/Pictures/bb3.jpg’,‘rb’))

]

headers = {

‘x-rapidapi-host’: ‘face-recognition4.p.rapidapi.com’,

‘x-rapidapi-key’: ‘b810129938msh1eb822ed1a5e36ep108a11jsn92fa2ad1c363’,

‘Content-Type’: ‘multipart/form-data’

}

response = requests.request(“POST”, url, headers=headers, data = payload, files = files)

print(response.text.encode(‘utf8’))

Hi Brian, Thanks for posting this issue.
Have you got any solution to this problem. I am facing the exact same issue while pulling the python code from the postman. Here is my code

import requests

import json

url = "http://127.0.0.1:6001/api/v1/solve-registration-challenge"

payload={'solvedRegFileLocation': '/var/opt/ncm_dms/reg'}

files=[
('regChallengeFile',('gudsgtcnsrk_reg_challenge.json',open('/home/raghav/Music/gudsgtcnsrk_reg_challenge.json','rb'),'application/json'))
]

headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)