AttributeError: 'PTNCPredicate' object has no attribute 'tag'
See original GitHub issueHello!
I followed the Big Postgres example and sometimes after I have finished a training, and go to do a static dedupe with my generated settings file, I get this error:
blocking...
creating blocking_map database
creating inverted index
ERROR:flask.app:Exception on /individual [GET]
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/app/.heroku/python/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/app.py", line 277, in individual
deduper.blocker.index(field_data, field)
File "/app/.heroku/python/lib/python3.6/site-packages/dedupe/blocking.py", line 66, in index
index.index(preprocess(doc))
File "/app/.heroku/python/lib/python3.6/site-packages/parseratorvariable/predicates.py", line 13, in preprocess
tags, _ = self.tag(doc)
AttributeError: 'PTNCPredicate' object has no attribute 'tag'
It looks like it is happening at line 179 in the example, which my code is identical to, except I have moved it into a flask app that uses celery (unsure if that is relevant).
I seem to get this error intermittently, and I’m not sure what is causing it. I am also a new to python development, so the error wording may make sense to someone more familiar with the language. Does anyone know why I could be getting this error?
I am using dedupe version 1.9.2 and python version 3.6.5
Edit: In case this helps, after more testing I have noticed that this only happens after I have completed a training, run a static dedupe, and then go to train data again. I can get through the training the second time, but when I try to use the settings file I generated, the above error is produced. If I restart the process, then I can complete another training and use that settings file successfully.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
I fixed this problem.
@tobyCurtis See if https://github.com/dedupeio/parseratorvariable/pull/4 helps any…