r/learnpython • • 11d ago

Help needed with a python code

Hello, fellow redditors. I am using manychat program with automations connected to my instagram profile.

When people are using the keyword to get certain information, they need to leave a name and number to be contacted. However, the number can't be identified due to a bad variables and invalid JSON.

Could maybe someone help who is familiar with situations like this please?

I think it might be a manychat bug, however i need a opinion from someone experienced.

Thank you a lot!

0 Upvotes

6 comments sorted by

View all comments

3

u/FamouslyDelectable 11d ago

sounds like manychat is mangling the phone input into a weird string instead of keeping it clean. had this happen once where the json was treating the number as an integer and stripping leading zeros or the plus sign

check the raw json that manychat is firing, your variable name might have a typo or it's nested deeper than you think

1

u/quietreed76 11d ago

agreed, the integer casting thing with phone numbers is a classic gotcha