第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

測試文件報錯

E:\pycharmProject\venv\Scripts\python.exe E:/pycharmProject/hello.py

Traceback (most recent call last):

? File "E:\pycharmProject\venv\lib\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 "E:/pycharmProject/hello.py", line 6, in <module>

? ? app = web.application(urls, globals())

? File "E:\pycharmProject\venv\lib\site-packages\web\application.py", line 62, in __init__

? ? self.init_mapping(mapping)

? File "E:\pycharmProject\venv\lib\site-packages\web\application.py", line 130, in init_mapping

? ? self.mapping = list(utils.group(mapping, 2))

? File "E:\pycharmProject\venv\lib\site-packages\web\utils.py", line 531, in group

? ? x = list(take(seq, size))

RuntimeError: generator raised StopIteration


正在回答

3 回答

https://img1.sycdn.imooc.com//5cb54e0a0001171308860262.jpg改成這樣就好了

0 回復(fù) 有任何疑惑可以回復(fù)我~

錯誤原因,python3以上安裝執(zhí)行應(yīng)pip install web.py==0.40-dev1,還要修改utils文件的526行

yield?next(seq)

to:

try:
????yield?next(seq)
except?StopIteration:
????return

做這個之前,請先卸載之前的安裝pip uninstall web.py

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

斑比站在你身旁

這個文件在什么地方?
2019-03-13 回復(fù) 有任何疑惑可以回復(fù)我~
#2

斑比站在你身旁

修改格式具體是什么? 改了后還是不對
2019-03-13 回復(fù) 有任何疑惑可以回復(fù)我~

To judge from the file paths, it looks like you're running Python 3.7. If so, you're getting caught by new-in-3.7 behavior?described here:

PEP 479 is enabled for all code in Python 3.7, meaning that StopIteration exceptions raised directly or indirectly in coroutines and generators are transformed into RuntimeError exceptions. (Contributed by Yury Selivanov in bpo-32670.)

Before this change, a?StopIteration?raised by, or passing through, a generator simply ended the generator's useful life (the exception was silently swallowed). The module you're using will have to be recoded to work as intended with 3.7.

Chances are they'll need to change:

yield?next(seq)

to:

try:
????yield?next(seq)
except?StopIteration:
????return


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

測試文件報錯

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號