example in package readme fails with traceback
paregorios opened this issue · comments
Tom Elliott commented
I tried the following (from the dominate package README) with Python 3.7.3 and dominate==2.3.5 in a virtual environment under OSX Mojave:
_html = html()
_head, _body = _html.add(head(title('Whatever')), body())
print(_html)
names = ['header', 'content', 'footer']
header, content, footer = _body.add(div(id=name) for name in names)
print(_html)
and got the following output:
<html>
<head>
<title>Whatever</title>
</head>
<body></body>
</html>
Traceback (most recent call last):
File "scripts/alt_index.py", line 54, in <module>
OPTIONAL_ARGUMENTS, POSITIONAL_ARGUMENTS, DEFAULT_LOG_LEVEL))
File "scripts/alt_index.py", line 44, in main
header, content, footer = _body.add(div(id=name) for name in names)
ValueError: not enough values to unpack (expected 3, got 0)
Tom Flanagan commented
Fixed. This was due to returning an exhausted generator