APIs & Integrations

WSuren
Mitglied

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!
0 Upvotes
4 Antworten
Long_Nguyen
Mitwirkender/Mitwirkende

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

Hi @dennisedson , @WSuren 

 

You might want to take a look at this.

https://github.com/HubSpot/hubspot-api-python/issues/22

 

Quick action: pip install hubspot-api-client

RIutsis
Mitglied

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

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
 

0 Upvotes
Sna458
Mitglied

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

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 😑

0 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

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

@JBeatty , could you lend a hand here?

0 Upvotes