No module named 'hubspot.crm' error when using 'from hubspot.crm.deals import ...'

Hello there,

I’d like to use Hubspot’s newest API and I really would like some help. I have a Cloud Function (python) on Google Cloud Platform where I run the following code (to test):

Code

def hello_world(request):

import hubspot

from hubspot.crm.deals import BatchInputSimplePublicObjectBatchInput

return ‘Success’

And I get the following error:

from hubspot.crm.deals import BatchInputSimplePublicObjectBatchInput

ModuleNotFoundError: No module named ‘hubspot.crm’

The installed packages are

hubspot
simplejson
requests
delorean

Do I need to install an extra package? Thanks for your help!

@JBeatty , could you lend a hand here?

Hi @dennisedson , @WSuren

You might want to take a look at this.

Quick action: pip install hubspot-api-client

Hi, I have the same problem. I use

hubspot-api-client=7.5.0

And when I try to run my code it shows me this message. I also tried hubspot lib, but it also didn’t help

I was running into this same problem and it was because my python file was named hubspot.py so it was trying to import that :expressionless_face:

The issue still exists - Python 3.9