I am trying to run this code:
import web
urls = (
'/', 'index'
)
if __name__ == "__main__":
app = web.application(urls, globals())
app.run()
But it gives me this error everytime
C:UsersaidkeDesktop>python app.py
Traceback (most recent call last):
File "C:UsersaidkeAppDataLocalProgramsPythonPython37-32libsite-packageswebutils.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 14, in <module>
app = web.application(urls, globals())
File "C:UsersaidkeAppDataLocalProgramsPythonPython37-32libsite-packageswebapplication.py", line 62, in __init__
self.init_mapping(mapping)
File "C:UsersaidkeAppDataLocalProgramsPythonPython37-32libsite-packageswebapplication.py", line 130, in init_mapping
self.mapping = list(utils.group(mapping, 2))
File "C:UsersaidkeAppDataLocalProgramsPythonPython37-32libsite-packageswebutils.py", line 531, in group
x = list(take(seq, size))
RuntimeError: generator raised StopIteration
I tried someone else's code and the exact same thing happened. Additionally I tried reinstalling web.py(experimental) but it still didn't work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…