Tipboard 中的 4x3 布局导致 500 内部服务器错误。这是 Tipboard 代码的结果吗?
4x3 Layout in Tipboard results in 500 Internal Server Error. Is this the result of Tipboard code?
我正在尝试设置 tipboard dashboard to be 4 columns and three rows, by editing the YAML code in ~\.tipboard\layout_config.yaml
, as per the configuration documentation 的布局。但是,将布局从 4x2 更改为 4x3(通过复制最后一行的配置)会导致 500 Internal Server Error
消息。重新启动提示板服务器没有任何区别。
我检查过 YAML 使用空格而不是制表符。我还用 YAML Lint.
验证了它
万一它是相关的:我 运行 在 64 位 Windows 10 上并且没有在 GNU/Linux.
上测试
提示板不支持这种布局还是我需要edit/override它的代码?如果可以,怎么做?
4x2 YAML:
details:
page_title: Empty Dashboard
layout:
- row_1_of_2:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_2_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_3_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_4_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- row_2_of_2:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_2_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_3_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_4_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
要生成 4x3 布局,请复制 row_2_of_2
的部分并适当地重命名行(row_1_of_3
、row_2_of_3
和 row_3_of_3
)。结果如下:
details:
page_title: Empty Dashboard
layout:
- row_1_of_3:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- row_2_of_3:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- row_3_of_3:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
提示板的控制台输出如下:
$ tipboard runserver
Raven is not configured (logging is disabled). Please see the documentation for more information.
[I 170807 10:33:54 console:145] Following keys already in Redis:
[I 170807 10:33:54 console:160] Listening on port localhost:7272...
[E 170807 10:34:02 web:1121] Uncaught exception GET / (::1)
HTTPRequest(protocol='http', host='localhost:7272', method='GET', uri='/', version='HTTP/1.1', remote_ip='::1', body='', headers={'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip, deflate, br', 'Host': 'localhost:7272', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', 'Connection': 'keep-alive', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Upgrade-Insecure-Requests': '1'})
Traceback (most recent call last):
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tornado\web.py", line 1077, in _execute
*self.path_args, **self.path_kwargs)
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\app.py", line 250, in get
page_title=flipboard.get_flipboard_title(),
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\app.py", line 53, in get_flipboard_title
config = process_layout_config(config_names[0])
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\parser.py", line 116, in process_layout_config
config['tiles_names'], config['tiles_keys'] = _find_tiles_names(layout)
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\parser.py", line 59, in _find_tiles_names
for row in _get_rows(layout):
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\parser.py", line 53, in _get_rows
raise WrongSumOfRows('The sum of the lines is incorrect.')
WrongSumOfRows: The sum of the lines is incorrect.
[E 170807 10:34:02 web:1514] 500 GET / (::1) 82.00ms
[W 170807 10:34:02 web:1514] 404 GET /favicon.ico (::1) 4.00ms
配置文件令人困惑的地方在于它指定了项目(行、列或面板)的维度,而不是位置[=30] =] 的项目。因此,与其指定行数(1、2 或 3),不如指定其高度(1 行高,在 3 行的配置中)。
错:row_1_of_3
,row_2_of_3
,row_3_of_3
(位置:1行高3以内,2行高3以内,3 3 以内的行高 = 3) 以内的 6 行
右:row_1_of_3
,row_1_of_3
,row_1_of_3
(高度:3行,每1行高=3行以内3)
重复以下三次,不改变行高(每行一次,每行 3 行):
- row_1_of_3:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
我正在尝试设置 tipboard dashboard to be 4 columns and three rows, by editing the YAML code in ~\.tipboard\layout_config.yaml
, as per the configuration documentation 的布局。但是,将布局从 4x2 更改为 4x3(通过复制最后一行的配置)会导致 500 Internal Server Error
消息。重新启动提示板服务器没有任何区别。
我检查过 YAML 使用空格而不是制表符。我还用 YAML Lint.
验证了它万一它是相关的:我 运行 在 64 位 Windows 10 上并且没有在 GNU/Linux.
上测试提示板不支持这种布局还是我需要edit/override它的代码?如果可以,怎么做?
4x2 YAML:
details:
page_title: Empty Dashboard
layout:
- row_1_of_2:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_2_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_3_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_4_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- row_2_of_2:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_2_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_3_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_4_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
要生成 4x3 布局,请复制 row_2_of_2
的部分并适当地重命名行(row_1_of_3
、row_2_of_3
和 row_3_of_3
)。结果如下:
details:
page_title: Empty Dashboard
layout:
- row_1_of_3:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- row_2_of_3:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- row_3_of_3:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
提示板的控制台输出如下:
$ tipboard runserver
Raven is not configured (logging is disabled). Please see the documentation for more information.
[I 170807 10:33:54 console:145] Following keys already in Redis:
[I 170807 10:33:54 console:160] Listening on port localhost:7272...
[E 170807 10:34:02 web:1121] Uncaught exception GET / (::1)
HTTPRequest(protocol='http', host='localhost:7272', method='GET', uri='/', version='HTTP/1.1', remote_ip='::1', body='', headers={'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip, deflate, br', 'Host': 'localhost:7272', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', 'Connection': 'keep-alive', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Upgrade-Insecure-Requests': '1'})
Traceback (most recent call last):
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tornado\web.py", line 1077, in _execute
*self.path_args, **self.path_kwargs)
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\app.py", line 250, in get
page_title=flipboard.get_flipboard_title(),
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\app.py", line 53, in get_flipboard_title
config = process_layout_config(config_names[0])
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\parser.py", line 116, in process_layout_config
config['tiles_names'], config['tiles_keys'] = _find_tiles_names(layout)
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\parser.py", line 59, in _find_tiles_names
for row in _get_rows(layout):
File "c:\usr\local\virtualenv\tipboard\lib\site-packages\tipboard\parser.py", line 53, in _get_rows
raise WrongSumOfRows('The sum of the lines is incorrect.')
WrongSumOfRows: The sum of the lines is incorrect.
[E 170807 10:34:02 web:1514] 500 GET / (::1) 82.00ms
[W 170807 10:34:02 web:1514] 404 GET /favicon.ico (::1) 4.00ms
配置文件令人困惑的地方在于它指定了项目(行、列或面板)的维度,而不是位置[=30] =] 的项目。因此,与其指定行数(1、2 或 3),不如指定其高度(1 行高,在 3 行的配置中)。
错:row_1_of_3
,row_2_of_3
,row_3_of_3
(位置:1行高3以内,2行高3以内,3 3 以内的行高 = 3) 以内的 6 行
右:row_1_of_3
,row_1_of_3
,row_1_of_3
(高度:3行,每1行高=3行以内3)
重复以下三次,不改变行高(每行一次,每行 3 行):
- row_1_of_3:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes:
- col_1_of_4:
- tile_template: empty
tile_id: empty
title: Empty Tile
classes: