简体   繁体   中英

pyenchant cirtial enchant_is_all_caps and enchant_is_title_case assertion message

I use pyenchant to auto-correct words, eg

import enchant
myDic = enchant.Dict('en_EN')
print myDict.check('foo')

Problem : I get the following error message from enchant, though it does not crash

** (process:24563): CRITICAL **: enchant_is_title_case: assertion `word && *word' failed

** (process:24563): CRITICAL **: enchant_is_all_caps: assertion `word && *word' failed

Found the answer in a discussion in the pyenchant GIT repository :

It was an empty line (or something that is interpret as such) in my personal dictionary. I have mine in ~/.config/enchant/en_EN.dic

Removing the empty line solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM