|
Traceback (most recent call last):
File "E:/Python/visuable date/btc_close_2017.py", line 59, in <module>
line_chart_month = draw_line(months[:idx_month], close[:idx_month], '收盘价月日均值(¥)', '月日均值')
File "E:/Python/visuable date/btc_close_2017.py", line 55, in draw_line
line_chart.render_to_file(title + '.svg')
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\ghost.py", line 165, in render_to_file
f.write(self.render(is_unicode=True, **kwargs))
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\ghost.py", line 122, in render
.make_instance(overrides=kwargs)
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\ghost.py", line 116, in make_instance
self.xml_filters)
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\graph\line.py", line 33, in __init__
super(Line, self).__init__(*args, **kwargs)
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\graph\base.py", line 74, in __init__
self._draw()
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\graph\base.py", line 291, in _draw
self._compute_margin()
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\graph\base.py", line 128, in _compute_margin
self.label_font_size)
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\util.py", line 229, in get_texts_box
max_len = max(map(len, get_text_title(texts)))
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\util.py", line 224, in get_text_title
for text in texts:
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\graph\base.py", line 126, in <lambda>
map(lambda x: truncate(x, self.truncate_label or 25),
File "C:\Users\Fyw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pygal\util.py", line 271, in truncate
if len(string) > index and index > 0:
TypeError: object of type 'int' has no len()
Process finished with exit code 1
|
|