-
Notifications
You must be signed in to change notification settings - Fork 511
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
Exception thrown from crf_slot_filler.py #806
Comments
@Shotgun167 |
MacOS 10.13.6 |
Do you get this error in a systematic and reproducible way? |
I get this error every time I my app finishes/exits. In the app, I create an object (nlp_actions.py) that does NLU for statements I give it. It creates the snips_engine in the most bog standard way: < After that, I do not interact with Snips in any way other than: < At the end of the main loop of my program, I do: < I'm assuming the NoneType is because there has been some cleanup in the Python internals before Snips gets to the cleanup code in crf_slot_filler.py. I don't think it is a big deal, other than a lot of nuisance error messages, but I was getting several screens full of them and this fix made them go away. |
I cannot reproduce locally. I'm running Python3.7.3, perhaps you could try to upgrade to this version. |
@Shotgun167 any update on this, have you tried with Python3.7.3 ? |
I've not had time to update to 3.7.3, but we do have the problem on 3.6. That's the version on our Jenkins server.
On Thursday, July 4, 2019, 5:44:55 AM EDT, Adrien Ball <[email protected]> wrote:
@Shotgun167 any update on this, have you tried with Python3.7.3 ?
Do you run into this issue with other python versions like Python3.6 ?
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
There's still a bug in the newest version from the repo, just a different exception in del:
The previous exception was:
My code reads data directly from YAML and fits the model.
|
Thanks @adam-ra , I'm reopening it then. I'll try to allocate some time soon to (re)-investigate. Essentially, the issue is that we rely on the CRFSuite C-library (wrapped in python in sklearn-crfsuite), and this lib requires a file to load a CRF model. This is annoying as we would prefer to have everything in memory, but that's how it is. |
del appears to be a very iffy method to use. |
Thanks for explanations! I get this warning each time I run unit tests in my code; it's somehow not cropping up otherwise.
|
On exit, Snips throws a few pages worth of:
2019-06-06` 10:36:19,863 [MainThread ] [VERBOSE] exit 1
Exception ignored in: <function CRFSlotFiller.del at 0x113e0b510>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/snips_nlu/slot_filler/crf_slot_filler.py", line 406, in del
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 983, in new
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 640, in _from_parts
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 624, in _parse_args
TypeError: 'NoneType' object is not callable
I stopped it by changing line 407 of "/usr/local/lib/python3.7/site-packages/snips_nlu/slot_filler/crf_slot_filler.py" to:
except (OSError, TypeError):
The text was updated successfully, but these errors were encountered: