dedupeio / dedupe-examples

:id: Examples for using the dedupe library
MIT License
406 stars 214 forks source link

Float issue #35

Closed clementcarrier closed 8 years ago

clementcarrier commented 8 years ago

I got an issue for the file pgsql_big_dedupe_example.py. Line 117, it says "'float' object cannot be interpreted as an integer".

More details :

File "", line 1, in dedupe.Dedupe(fields, num_cores=4)

File "/Applications/anaconda/lib/python3.5/site-packages/dedupe/api.py", line 181, in init super(DedupeMatching, self).init(_args, *_kwargs)

File "/Applications/anaconda/lib/python3.5/site-packages/dedupe/api.py", line 627, in init self.data_model = datamodel.DataModel(variable_definition)

File "/Applications/anaconda/lib/python3.5/site-packages/dedupe/datamodel.py", line 23, in init primary_fields, variables = typifyFields(fields)

File "/Applications/anaconda/lib/python3.5/site-packages/dedupe/datamodel.py", line 158, in typifyFields field_object = field_class(definition)

File "/Applications/anaconda/lib/python3.5/site-packages/dedupe/variables/categorical_type.py", line 23, in init self.comparator = CategoricalComparator(categories)

File "/Applications/anaconda/lib/python3.5/site-packages/categorical/categorical.py", line 20, in init response = responseVector(i, vector_length)

File "/Applications/anaconda/lib/python3.5/site-packages/categorical/categorical.py", line 44, in responseVector response = numpy.zeros(vector_length)

fgregg commented 8 years ago

I just pushed a new version of dedupe to pypi, download it and this should fix your problem. https://pypi.python.org/pypi/dedupe

fgregg commented 8 years ago

You also need to upgrade https://pypi.python.org/pypi/categorical-distance