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.

ValueError: need more than 0 values to unpack in gazetteer_example.py

See original GitHub issue

I can’t run gazetteer_example on Ubuntu:

$ python gazetteer_example.py
importing data ...
gazetteer_example.py:53: RuntimeWarning: Argument <type 'str'> is not an unicode object. Passing an encoded string will likely have unexpected results.
  column = unidecode(column)
N data 1 records: 1081
N data 2 records: 1092
/home/alix/.local/lib/python2.7/site-packages/dedupe/sampling.py:39: UserWarning: 7500 blocked samples were requested, but only able to sample 7498
  % (sample_size, len(blocked_sample)))
starting active labeling...
# labeling...
Finished labeling
Start calculating threshold
Threshold: 0.148433491588
Traceback (most recent call last):
  File "gazetteer_example.py", line 165, in <module>
    results = gazetteer.match(messy, threshold=threshold, n_matches=1)
  File "/home/alix/.local/lib/python2.7/site-packages/dedupe/api.py", line 992, in match
    return list(clusters)
  File "/home/alix/.local/lib/python2.7/site-packages/dedupe/clustering.py", line 200, in gazetteMatching
    for block in scored_blocks:
  File "/home/alix/.local/lib/python2.7/site-packages/dedupe/core.py", line 345, in scoreGazette
    for scored_pairs in imap(score_records, records):
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 668, in next
    raise value
ValueError: need more than 0 values to unpack

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
fgreggcommented, Apr 4, 2018

It’s available right now.

pip install dedupe==1.9.2

1reaction
fgreggcommented, Feb 12, 2018

This should be addressed with the newest release of dedupe. 1.9.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: need more than 0 values to unpack (python lists)
I believe the error is thrown because of initializing two empty lists on a single line. If if initialize them on separate lines,...
Read more >
Easy Fix to ValueError: Need More than 1 Value to Unpack
In python valueError: need more than 1 value to unpack is a peculiar error to deal with. While working with python, the chances...
Read more >
python - ValueError: need more than 0 values to unpack
I'm working on images and its working fine when code is out of function, and gives error when code is inside the function....
Read more >
need more than 1 value to unpack' in Python - Quora
How do I fix this error, "ValueError: need more than 1 value to unpack" in Python? ... For instance the code was expecting...
Read more >
ValueError: Too many values to unpack in Python - STechies
Sometimes, you might need to unpack the elements or values from a list. ... But, if the number of list elements is more...
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