StopIteration exception ...

77 views
Skip to first unread message

David Sierro

unread,
Feb 7, 2018, 10:05:47 PM2/7/18
to web.py
Dear colleagues,

i am using python3.7 and i have tried many web.py different versions (pip install web.py==0.40.dev0, git+https://github.com/webpy/webpy#egg=web.py, ...) so far, however, i am always getting the StopIteration error for the following code

urls = (
    '/x1/(.*)', 'x1',
    '/x2/(.*)', 'x2',
    '/x3/(.*)', 'x3'
)

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


ERROR 
app = web.application(urls, globals())
  File "C:\Users\D056772\AppData\Local\Programs\Python\Python37-32\web\application.py", line 62, in __init__
    self.init_mapping(mapping)
  File "C:\Users\D056772\AppData\Local\Programs\Python\Python37-32\web\application.py", line 130, in init_mapping
    self.mapping = list(utils.group(mapping, 2))
  File "C:\Users\D056772\AppData\Local\Programs\Python\Python37-32\web\utils.py", line 531, in group
    x = list(take(seq, size))
RuntimeError: generator raised StopIteration


The same code works in a Mac with Python2.7

Could you please support on this? Thanks in advance.

Kind regards,
David 
Reply all
Reply to author
Forward
0 new messages