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: long.__cmp__(x,y) requires y to be a 'long', not a 'NoneType' #9

Open
thisisaaronland opened this issue Apr 25, 2018 · 2 comments

Comments

@thisisaaronland
Copy link

Processing venues from California. It appears to be phone-number related? All of the phone numbers are encoded as strings but maybe this is an empty string?

dedupe_geojson -o ./ca-ca /usr/local/data/lieu/whosonfirst-data-venue-us-ca.txt
...
did 297020000 hashes requiring 36901348 pairwise comparisons
Traceback (most recent call last):
  File "/usr/local/bin/dedupe_geojson", line 4, in <module>
    __import__('pkg_resources').run_script('lieu==1.0', 'dedupe_geojson')
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 658, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1438, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python2.7/site-packages/lieu-1.0-py2.7.egg/EGG-INFO/scripts/dedupe_geojson", line 420, in <module>
    is_dupe = dupe_func(canonical, other, dupe_pairs, dupes, **dupe_func_kw)
  File "/usr/local/lib/python2.7/site-packages/lieu-1.0-py2.7.egg/EGG-INFO/scripts/dedupe_geojson", line 113, in is_name_address_dupe
    fuzzy_street_name=fuzzy_street_names)
  File "/usr/local/lib/python2.7/site-packages/lieu-1.0-py2.7.egg/lieu/dedupe.py", line 418, in dupe_class_and_sim
    name_fuzzy_dupe_class = PhoneNumberDeduper.revised_dupe_class(name_fuzzy_dupe_class, a1, a2)
  File "/usr/local/lib/python2.7/site-packages/lieu-1.0-py2.7.egg/lieu/dedupe.py", line 344, in revised_dupe_class
    if dupe_class == duplicate_status.NEEDS_REVIEW and same_phone_number:
  File "/usr/local/lib/python2.7/site-packages/postal/utils/enum.py", line 16, in __cmp__
    return self.value.__cmp__(other)
TypeError: long.__cmp__(x,y) requires y to be a 'long', not a 'NoneType'
@thisisaaronland
Copy link
Author

Specifically the (WOF) data is prepared for lieu using this:

https://github.com/whosonfirst/go-whosonfirst-lieu/blob/master/cmd/lieu-prepare-wof.go

@thisisaaronland
Copy link
Author

I re-generated the input data to filter out empty phone numbers but the problem still manifests itself. Thoughts about where/what the bad data (?) might be ?

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

1 participant