DayBreak-u / chineseocr_lite

超轻量级中文ocr,支持竖排文字识别, 支持ncnn、mnn、tnn推理 ( dbnet(1.8M) + crnn(2.5M) + anglenet(378KB)) 总模型仅4.7M
GNU General Public License v2.0
11.72k stars 2.25k forks source link

RuntimeError: generator raised StopIteration #114

Open keithyh opened 4 years ago

keithyh commented 4 years ago

In running python app.py 8080, I met this runtimeerror.How to solve it then?

deep2@deep2-Latitude-E6430:~/chineseocr_lite-master$ python app.py 8080

make: Entering directory '/home/deep2/chineseocr_lite-master/psenet/pse' make: 'pse.so' is up to date. make: Leaving directory '/home/deep2/chineseocr_lite-master/psenet/pse' device: cuda:0 load model device: cuda:0 load model device: cuda:0 load model device: cuda:0 load model Traceback (most recent call last): File "/home/deep2/anaconda3/lib/python3.7/site-packages/web/utils.py", line 526, in take yield next(seq) StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "app.py", line 125, in app = web.application(urls, globals()) File "/home/deep2/anaconda3/lib/python3.7/site-packages/web/application.py", line 62, in init self.init_mapping(mapping) File "/home/deep2/anaconda3/lib/python3.7/site-packages/web/application.py", line 130, in init_mapping self.mapping = list(utils.group(mapping, 2)) File "/home/deep2/anaconda3/lib/python3.7/site-packages/web/utils.py", line 531, in group x = list(take(seq, size)) RuntimeError: generator raised StopIteration

jameswangcnbj commented 4 years ago

直接修改对应的utils.py 修改为:注意用编辑器修改不要用vi,会有空格问题 try: yield next(seq) except StopIteration: return

keithyh commented 4 years ago

okay

xugaoxiang commented 4 years ago

pip install -U web.py