Problem with Subscription python API

Hello! :slightly_smiling_face:

I am trying to use the Subscription python API to check and modifty the subscription of our contacts. I am trying to retrive the subscription information of my contacts via the python API as it is indicated in the documentation. I am doing:
import hubspot
from pprint import pprint
from hubspot.communication_preferences.subscribe import ApiException
try:
api_response = client.communication_preferences.subscribe.status_api.get_email_status(email_address=“myemail@gmail.com”)
pprint(api_response)
except ApiException as e:
print(“Exception when calling status_api->get_email_status: %s\n” % e)
and I am getting the following error:
ModuleNotFoundError: No module named ‘hubspot.communication_preferences.subscribe’
I have been working with the other HS python API and never got this kind of error (so the HS library is properly installed I guess). Just wondering if I should do something else which is missed in the documentation (or maybe it’s written somewhere else)?
Many thanks in advance for your help,
Iván.

Hi @ioteo,

I’ll tag @MatthiasWeber & @taran42 again to see if they have any tips. Thank you! :star:

Cheers
Mia, Community Team

i’m sorry. No knowledge in python. Sorry.

No worries @MatthiasWeber, thank you anyway! :slightly_smiling_face:

@ioteo Double check the module name you are calling hubspot.communication_preferences.subscribe . Make sure it’s spelled correctly, you have it installed and it’s pointing to the correct path. I am not familiar with that one in particular, so I cannot say if it is right or wrong.