Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3.6 Example programs报错 #3

Closed
akarrin opened this issue Aug 24, 2017 · 3 comments
Closed

python3.6 Example programs报错 #3

akarrin opened this issue Aug 24, 2017 · 3 comments

Comments

@akarrin
Copy link

akarrin commented Aug 24, 2017

运行Example programs报错“IndexError: list index out of range”

`IndexError Traceback (most recent call last)
in ()
11 bar.add("商家B", attr, v2, is_stack=True)
12 bar.render()
---> 13 make_a_snapshot('render.html', 'snapshot.png')

D:\ProgramData\lib\site-packages\pyecharts_snapshot\main.py in make_a_snapshot(file_name, output_name)
53 else:
54 content = io.TextIOWrapper(proc.stdout, encoding="utf-8").read()
---> 55 base64_imagedata = content.split(',')[1]
56 imagedata = decode_base64(base64_imagedata.encode('utf-8'))
57 if file_type == 'pdf':

IndexError: list index out of range`

@chfw
Copy link
Member

chfw commented Aug 24, 2017

Have you installed phantomjs? If yes, please try this command and see if you have any output:

phantomjs pyechart_snapshot/phantomjs/snapshot.js render.html png

or you can download the js file from:

https://github.com/chfw/pyecharts-snapshot/blob/master/pyecharts_snapshot/phantomjs/snapshot.js

@akarrin akarrin closed this as completed Aug 25, 2017
@akarrin
Copy link
Author

akarrin commented Aug 25, 2017

Thank you. You've helped me a lot.

@chfw
Copy link
Member

chfw commented Aug 25, 2017

My pleasure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants