Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unsupported operand type(s) for + #144

Closed
FloWuenne opened this issue Jul 16, 2023 · 2 comments
Closed

TypeError: unsupported operand type(s) for + #144

FloWuenne opened this issue Jul 16, 2023 · 2 comments

Comments

@FloWuenne
Copy link

Hi Cylinter team,

installed Cylinter in a fresh conda environment on my Macbook today and wanted to test with the example dataset.
I downloaded the example dataset using the following demo command:

prep cylinter_demo ~/Desktop/cylinter_demo  # Enter Synapse ID and password when prompted.

When I try to run the example data using the following command, I get the error below. Trying with a specific module gives the same error.

Thanks for the help!

cylinter ~/Desktop/cylinter_demo/config.yml

Traceback (most recent call last):
  File "/Users/florian_wuennemann/miniconda3/envs/cylinter/bin/cylinter", line 6, in <module>
    from cylinter.cylinter import main
  File "/Users/florian_wuennemann/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/cylinter.py", line 7, in <module>
    from . import pipeline, components
  File "/Users/florian_wuennemann/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/pipeline.py", line 4, in <module>
    from . import components
  File "/Users/florian_wuennemann/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/components.py", line 15, in <module>
    import hdbscan
  File "/Users/florian_wuennemann/miniconda3/envs/cylinter/lib/python3.10/site-packages/hdbscan/__init__.py", line 1, in <module>
    from .hdbscan_ import HDBSCAN, hdbscan
  File "/Users/florian_wuennemann/miniconda3/envs/cylinter/lib/python3.10/site-packages/hdbscan/hdbscan_.py", line 40, in <module>
    FAST_METRICS = KDTree.valid_metrics + BallTree.valid_metrics + ["cosine", "arccos"]
TypeError: unsupported operand type(s) for +: 'builtin_function_or_method' and 'builtin_function_or_method'
@gjbaker
Copy link
Member

gjbaker commented Jul 17, 2023

Hello and thank you for your comment!

We have recently observed this error and believe it is caused by an update to the scikit-learn API that has made it incompatible with the density-based clustering package used by CyLinter (HDBSCAN). Running (pip install 'scikit-learn<1.3.0') should fix the problem. We will soon be pushing an updated version of the conda-build recipe that takes care of the issue at the point of initial installation.

@FloWuenne
Copy link
Author

That fixed it! Thank you very much for the rapid response @gjbaker ! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants