# Personalized Code Not Working : HELP

**URL:** <https://community.hubspot.com/t/personalized-code-not-working-help/71498>\
**Category:** APIs & Integrations\
**Created:** [December 19, 2022, 1:21pm UTC](https://community.hubspot.com/t/personalized-code-not-working-help/71498 "2022-12-19T13:21:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CMayer2](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@CMayer2](https://community.hubspot.com/u/CMayer2)\
**Post date:** [December 19, 2022, 1:21pm UTC](https://community.hubspot.com/t/personalized-code-not-working-help/71498/1 "2022-12-19T13:21:55Z")

</div>

Hello 🙂 I have a huge problem with my personalized code to link Diabolocom with Hubspot : Could you please help me ?

Here is the part of the code :

try:

ApiResponse = hubspot.crm.contacts.basic\_api.get\_by\_id(event.get(‘object’).get(‘objectId’), properties=[“phone”,“hs\_object\_id”])

phone = ApiResponse.properties.get(‘phone’)

phone = re.sub(“^0(.\*)”,r"33\1",phone)  
phone=phone.replace(" “,”")

hs\_object\_id = ApiResponse.properties.get(‘hs\_object\_id’)

except ApiException as e:

print(e)

raise

And here is my ERROR :

```auto
[ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'hubspotHandler': invalid syntax (file.py, line 25)
Traceback (most recent call last):
  File "/var/task/file.py" Line 25
    phone=ApiResponse.properties.get('phone')And i just want to cry beacause i don't understand...Thank you by adavance for your advices !Céline

```

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 19, 2022, 9:21pm UTC](https://community.hubspot.com/t/personalized-code-not-working-help/71498/2 "2022-12-19T21:21:27Z")

</div>

Hi, @CMayer2 👋 Thanks for reaching out. Hey, @JBeatty @taran42, do you have any Python wisdom you can share with @CMayer2?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![CMayer2](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@CMayer2](https://community.hubspot.com/u/CMayer2)\
**Post date:** [December 21, 2022, 9:22am UTC](https://community.hubspot.com/t/personalized-code-not-working-help/71498/3 "2022-12-21T09:22:23Z")

</div>

Hi 🙂 Thank you so much to try to help me 🙂

I did some corrections and i have now an other error code : Fichiers Journaux…

I really need help please 🙂

Thank you by advance !

Céline
