question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while trying the basic example

See original GitHub issue

Installed using pip. Tried the very simple example from the readme, but got this error when importing the package.

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-15-95b951ea2a53> in <module>
----> 1 from polyfuzz import PolyFuzz
      2 
      3 from_list = ["apple", "apples", "appl", "recal", "house", "similarity"]
      4 to_list = ["apple", "apples", "mouse"]
      5 

~\miniconda3\envs\fastai\lib\site-packages\polyfuzz\__init__.py in <module>
----> 1 from .polyfuzz import PolyFuzz
      2 __version__ = "0.3.0"

~\miniconda3\envs\fastai\lib\site-packages\polyfuzz\polyfuzz.py in <module>
      5 from polyfuzz.linkage import single_linkage
      6 from polyfuzz.utils import check_matches, check_grouped, create_logger
----> 7 from polyfuzz.models import TFIDF, RapidFuzz, Embeddings, BaseMatcher
      8 from polyfuzz.metrics import precision_recall_curve, visualize_precision_recall
      9 

~\miniconda3\envs\fastai\lib\site-packages\polyfuzz\models\__init__.py in <module>
      2 from ._distance import EditDistance
      3 from ._rapidfuzz import RapidFuzz
----> 4 from ._tfidf import TFIDF
      5 from ._utils import cosine_similarity
      6 

~\miniconda3\envs\fastai\lib\site-packages\polyfuzz\models\_tfidf.py in <module>
      5 from sklearn.feature_extraction.text import TfidfVectorizer
      6 
----> 7 from ._utils import cosine_similarity
      8 from ._base import BaseMatcher
      9 

~\miniconda3\envs\fastai\lib\site-packages\polyfuzz\models\_utils.py in <module>
      7 
      8 try:
----> 9     from sparse_dot_topn import awesome_cossim_topn
     10     _HAVE_SPARSE_DOT = True
     11 except ImportError:

~\miniconda3\envs\fastai\lib\site-packages\sparse_dot_topn\__init__.py in <module>
      3 
      4 if sys.version_info[0] >= 3:
----> 5     from sparse_dot_topn.awesome_cossim_topn import awesome_cossim_topn
      6 else:
      7     from awesome_cossim_topn import awesome_cossim_topn

~\miniconda3\envs\fastai\lib\site-packages\sparse_dot_topn\awesome_cossim_topn.py in <module>
      5 
      6 if sys.version_info[0] >= 3:
----> 7     from sparse_dot_topn import sparse_dot_topn as ct
      8     from sparse_dot_topn import sparse_dot_topn_threaded as ct_thread
      9 else:

__init__.pxd in init sparse_dot_topn.sparse_dot_topn()

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MaartenGrcommented, Jun 16, 2021

Numpy was upgraded to the new version to be compatible with the package. If in a new environment, you try out the new version of PolyFuzz, you should have no issues.

If it does not work out, please let me know!

0reactions
EtienneTcommented, Jun 14, 2021

Installed numpy 1.20.3, and running the basic example works now.

But I get the following errors when using pip:

polyfuzz 0.3.2 requires numpy<=1.19.4,>=1.18.5, but you have numpy 1.20.3 which is incompatible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when trying to run expo example · Issue #38 - GitHub
Hi, Unable to run the demo app from react native repo https://github.com/GetStream/react-native-example I followed instructions, ...
Read more >
JavaScript Errors Try Catch Throw - W3Schools
This example examines input. If the value is wrong, an exception (err) is thrown. The exception (err) is caught by the catch statement...
Read more >
vue.js - I am gettting an error while trying to implement a basic ...
I get an error ( "Error: xAxis "0" not found" ), while trying to implement a simple example found here: Any assistance is...
Read more >
8. Errors and Exceptions — Python 3.11.1 documentation
The error is caused by (or at least detected at) the token preceding the arrow: in the example, the error is detected at...
Read more >
On Error Statement - Visual Basic | Microsoft Learn
This example first uses the On Error GoTo statement to specify the location of an error-handling routine within a procedure. In the example,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found