ADASYN object attribute error

Hi all,

I’m trying to implement the ADASYN community node, but I’m having trouble executing it. I’m recieving the followoing python error script:

ERROR Python Script (1⇒1) (deprecated) 3:1:0:30   Execute failed: 'ADASYN' object has no attribute 'fit_sample'
Traceback (most recent call last):
  File "<string>", line 15, in <module>
AttributeError: 'ADASYN' object has no attribute 'fit_sample'

I don’t have much experience with coding, but based on what I can see it may be the case that I’ve installed the incorrect python dependencies. I can see in a similar SMOTE problem mentioned on Stack Overflow that this is because

fit_sample was renamed to fit_resample in v0.4 .

I’m struggling to downgrade the imbalanced-learn package to v0.3 to check if my suspicion is correct, however v0.4 was release on October 12 2018 with the node being released a year later so might possbly use a newer version, an I’m misunderstanding the error prompt.

Is there any way to investigate and potentially change the python script of a community node locally to correct fit_sample with fit_resample if that is indeed what has happend, or should I continue trying to downgrade my imbalanced-learn package in my python environment?


this is not a community extension, but a component. If you have a look at the screenshot from your link, then above the name you see Component.

Now, you can have a close look into a component by right-clicking and opening it. See this manual for more details.

Does this help?

Best regards

1 Like

Hi Steffen,

That’s brilliant. I’ve not played around with the components before so I wasn’t sure where to start but that’s let me fix the code. Thank you for your help :+1:t2:

All the best,

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.