Minoru Osukaunread, Oct 8, 2018, 10:54:14 PM10/8/18 to Whoosh Hi, I'm working on implement custom tokenizer with Whoosh. My custom tokenizer and test code is following: Custom tokenizer: from whoosh.analysis import Tokenizer, Token def __call__(self, value, positions=False, chars=False, keeporiginal=False, removestops=True, start_pos=0, token = Token(positions, chars, removestops=removestops, mode=mode, **kwargs) if not tokenize: Test code: import unittest def tearDown(self): def test_create_index(self): But it occurred "TypeError:
can't pickle _thread.lock objects" as following: Testing started at 2:50 PM ... Can anyone tell me how to solve it? Environment:
Thanks Minoru Osukaunread, Oct 8, 2018, 11:46:20 PM10/8/18 to Whoosh I had solve it. it needed __getstate__ and __setstate__. Thanks |