[SOLVED] Unable to remove CRF model file at path '...': PermissionError(13, ...)

Hi, I try to run the python sample code on Windows 8.1, but this kind of errors keeps occurring every time.

Unable to remove CRF model file at path ‘C:\Users\Example\AppData\Local\Temp\model8nzigxgn.crfsuite’: PermissionError(13, ‘The process cannot access the file because it is being used by another process’)

I run cmd as administrator and check permission of the folder but the problems still persist.

Hi @Onion,
This issue has also been reported on the github repo. So far, I have not been able to reproduce, but I’ll keep investigating and try to replicate it on a windows environment.

Is the temporary .crfsuite file (mentioned in the warning message) still there once the sample code has finished running?
Thanks

I just managed to reproduce on a windows environment and found a fix to prevent this warning from popping at cleanup time, see https://github.com/snipsco/snips-nlu/pull/843.

Hi, adri. The problem is solved now. Thank you very much. :smiley:

1 Like

Copy and paste the content from following URL

https://raw.githubusercontent.com/snipsco/snips-nlu/master/snips_nlu/slot_filler/crf_slot_filler.py