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

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

Open
jschulberg opened this issue Aug 6, 2021 · 4 comments
Open

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

jschulberg opened this issue Aug 6, 2021 · 4 comments

Comments

@jschulberg
Copy link

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
Copy link
Owner

Lyonk71 commented Aug 6, 2021

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
Copy link
Author

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
Copy link
Author

@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
Copy link

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

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

3 participants