# Problem with Subscription python API

**URL:** <https://community.hubspot.com/t/problem-with-subscription-python-api/66754>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [October 8, 2022, 7:49am UTC](https://community.hubspot.com/t/problem-with-subscription-python-api/66754 "2022-10-08T07:49:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ioteo](https://avatars.discourse-cdn.com/v4/letter/i/53a042/32.png) [@ioteo](https://community.hubspot.com/u/ioteo)\
**Post date:** [October 8, 2022, 7:49am UTC](https://community.hubspot.com/t/problem-with-subscription-python-api/66754/1 "2022-10-08T07:49:21Z")

</div>

Hello! 🙂

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](mailto:ivanoteogomez@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.

---

<div class="post-metadata">

**Author:** ![MiaSrebrnjak](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miasrebrnjak/32/10_2.png) [@MiaSrebrnjak](https://community.hubspot.com/u/MiaSrebrnjak)\
**Post date:** [October 11, 2022, 10:19am UTC](https://community.hubspot.com/t/problem-with-subscription-python-api/66754/2 "2022-10-11T10:19:37Z")

</div>

Hi @ioteo,

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

Cheers  
Mia, Community Team

---

<div class="post-metadata">

**Author:** ![MatthiasWeber](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/matthiasweber/32/27498_2.png) [@MatthiasWeber](https://community.hubspot.com/u/MatthiasWeber)\
**Post date:** [October 11, 2022, 10:38am UTC](https://community.hubspot.com/t/problem-with-subscription-python-api/66754/3 "2022-10-11T10:38:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MiaSrebrnjak](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miasrebrnjak/32/10_2.png) [@MiaSrebrnjak](https://community.hubspot.com/u/MiaSrebrnjak)\
**Post date:** [October 12, 2022, 8:09am UTC](https://community.hubspot.com/t/problem-with-subscription-python-api/66754/4 "2022-10-12T08:09:54Z")

</div>

No worries @MatthiasWeber, thank you anyway! 🙂

---

<div class="post-metadata">

**Author:** ![taran42](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/taran42/32/105524_2.png) [@taran42](https://community.hubspot.com/u/taran42)\
**Post date:** [October 11, 2022, 1:32pm UTC](https://community.hubspot.com/t/problem-with-subscription-python-api/66754/5 "2022-10-11T13:32:25Z")

</div>

@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.
