Lyonk71 / pandas-dedupe

Simplifies use of the Dedupe library via Pandas
135 stars 30 forks source link

Field type String is not valid. Valid types include Custom #42

Open jschulberg opened 3 years ago

jschulberg commented 3 years ago

Hello,

I'm attempting to run pandas-dedupe inside of a Pyinstaller executable. I keep running into the following error + traceback:

Importing data ...
Traceback (most recent call last):
    File "dedupe/datamodel.py", line 157, in typifyFields
KeyError: 'String'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "MyCode.py", line 760, in <module>
   File "MyCode.py", line 695 in main
      fields, # List of fields to base deduplication on in my script
   File "pandas_dedupe\dedupe_dataframe.py", line 245, in dedupe_dataframe
   File "pandas_dedupe\dedupe_dataframe.py", line 102, in _train
   File "dedupe\api.py", line 990, in __init__
   File "dedupe\datamodel.py", line 26, in __init__
   File "dedupe\datamodel.py", line 159, in typifyFields
KeyError: 'Field type String not valid. Valid types include Custom'

Any guidance would be of help! I tried convert my fields to a list of dictionaries instead a list of tuples and then commenting out the code in utility_functions.py that converts the field list of tuples into a list of dictionaries, but to no avail.

Lyonk71 commented 3 years ago

Hey Justin,

I've created several cli apps with pandas-dedupe + pyinstaller, so it's definitely possible.

I recall it was a PITA, but don't remember how I solved it off-hand. I might have time later try on my end. I'd be curious to hear if you have any more updates - might jog my memory.

jschulberg commented 3 years ago

Hi Keith,

Glad to know it's possible to do. I've tried a bunch of different tweaks, including retraining the model and getting a new settings and training.json file. The interesting thing is that the main script works fine in Spyder, but when put into an executable, starts throwing that error.

jschulberg commented 3 years ago

@Lyonk71 I still haven't made much progress in figuring out the cause of the issue. Do you have any ideas on how I can go about debugging it?

jbaudino commented 9 months ago

Hey @Lyonk71 @jschulberg after all passed time, could you solve that issue ? I exactly facing the same problem...lol Thank you