UCL-INGI / ICTV

ICTV is a simple content management system for digital signage on multiple screens.
Other
15 stars 5 forks source link

`RuntimeError` when trying to launch `ictv-webapp` into python3.7 virtualenv #5

Closed nrybowski closed 5 years ago

nrybowski commented 5 years ago

Hi,

I installed ICTV via the pip3 command given here into a fresh python3.7 virtualenv and I got this error :

ictv-webapp 0.0.0.0:8080 --config configuration.yaml 

Exception encountered when starting the application
Traceback (most recent call last):
  File "<$HOME>/ICTV/env/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 "<$HOME>/ICTV/env/lib/python3.7/site-packages/ictv/app.py", line 506, in main
    app = get_app(config_file)
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/ictv/app.py", line 404, in get_app
    app = web.application(app_urls, globals())
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/web/application.py", line 62, in __init__
    self.init_mapping(mapping)
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/web/application.py", line 130, in init_mapping
    self.mapping = list(utils.group(mapping, 2))
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/web/utils.py", line 531, in group
    x = list(take(seq, size))
RuntimeError: generator raised StopIteration
Traceback (most recent call last):
  File "<$HOME>/ICTV/env/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 "<$HOME>/ICTV/env/bin/ictv-webapp", line 67, in <module>
    main(config_file)
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/ictv/app.py", line 517, in main
    raise e
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/ictv/app.py", line 506, in main
    app = get_app(config_file)
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/ictv/app.py", line 404, in get_app
    app = web.application(app_urls, globals())
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/web/application.py", line 62, in __init__
    self.init_mapping(mapping)
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/web/application.py", line 130, in init_mapping
    self.mapping = list(utils.group(mapping, 2))
  File "<$HOME>/ICTV/env/lib/python3.7/site-packages/web/utils.py", line 531, in group
    x = list(take(seq, size))
RuntimeError: generator raised StopIteration

I have the same issue when running the source code with python3.7

I tried the same installation with a python3.6 virtualenv and all is working like a charm.

anthonygego commented 5 years ago

This is a well-known issue with webpy. https://github.com/webpy/webpy/blob/90badb20a66a508c437c3774a7d4b947bb907ba3/web/utils.py#L515

A workaround is to redefine the group function as this was done in INGInious : https://github.com/UCL-INGI/INGInious/commit/e46e9d1d4bbc154eea02e4434ea8cee632c6b080#diff-4b6f18954394b722424a8475d4f83dc3R35

mpiraux commented 5 years ago

@nrybowski could you try updating web.py with this https://github.com/webpy/webpy/commit/dab9d157bd284b65b172096b3cae2efac0741b03 ?

mpiraux commented 5 years ago

I close this issue as it more web.py related than ICTV related.