Coder Social home page Coder Social logo

Comments (16)

myperfectcolor avatar myperfectcolor commented on July 17, 2024 1

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

I have a little more info. I believe the problem is I'm passing a single value for the definition, yet the code is looking for definition.value. I don't know what this means and how to change the code.

This is what I have:

import json
from hubspot3.crm_associations import CRMAssociationsClient

API_KEY = "#############################"

associate_client = CRMAssociationsClient(api_key=API_KEY)

params = {
"from_object": 7307801,
"to_object": 1181162112,
"category": "HUBSPOT_DEFINED",
"definitionId": 4
}

associate_data = associate_client.create(params.get(
"from_object"), params.get("to_object"), params.get("definitionId"))
print(json.dumps(associate_data))

ERROR:
"definitionId": definition.value,
AttributeError: 'int' object has no attribute 'value'

from hubspot3.

jpetrucciani avatar jpetrucciani commented on July 17, 2024

Ah yeah, in the CRMAssociationsClient, it's expecting an enum value for definition (hence the .value). I can see if I can fix that up to accept enum or int!

from hubspot3.

jpetrucciani avatar jpetrucciani commented on July 17, 2024

Okay I've pushed a fix, it should be available as version 3.2.41 on pip now.

Could you try:

pip install hubspot3==3.2.41

and then attempt to run the CLI command from your first message?

from hubspot3.

jpetrucciani avatar jpetrucciani commented on July 17, 2024

Awesome! Glad it's working now 😄

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

jpetrucciani avatar jpetrucciani commented on July 17, 2024

Apologies for the lack of response here - I'm currently on vacation, but I could help out after Christmas if you still need it!

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

myperfectcolor avatar myperfectcolor commented on July 17, 2024

from hubspot3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.