# Getting keyerror on "id"

**URL:** <https://community.hubspot.com/t/getting-keyerror-on-id/70340>\
**Category:** APIs & Integrations\
**Tags:** python\
**Created:** [December 1, 2022, 9:19am UTC](https://community.hubspot.com/t/getting-keyerror-on-id/70340 "2022-12-01T09:19:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SJain54](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@SJain54](https://community.hubspot.com/u/SJain54)\
**Post date:** [December 1, 2022, 9:19am UTC](https://community.hubspot.com/t/getting-keyerror-on-id/70340/1 "2022-12-01T09:19:28Z")

</div>

![SJain54_0-1669881308162.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/e/def125e091db8952ab515f5070bce2adc354d899.png)

I am trying to pop the value at key “id” in the json response. But it gives a keyerror while running the python code inside the workflow. I am unable to understand this keyerror.  
I have checked the json separately and I can see the key “id” exists (Check below ss). In this case, the example contact id is 26528201. But this issue is occuring for a lot of contacts.  
Can someone please suggest a resolution for this.

 ![SJain54_1-1669885711706.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/8/88358496aabdf0189087b017b52920970b3a7a01.png)

---

<div class="post-metadata">

**Author:** ![skimura](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@skimura](https://community.hubspot.com/u/skimura)\
**Post date:** [December 1, 2022, 9:59am UTC](https://community.hubspot.com/t/getting-keyerror-on-id/70340/2 "2022-12-01T09:59:52Z")

</div>

@SJain54

Hi.

Is your call ‘output.pop(‘id’)’ before set ‘customer\_id’ ?

If your call ‘pop’ before, ‘id’ is removed.

_‘pop’: Remove the item at the given position in the list, and return it._

If not, please provide the more source code if possible.

Thanks.
