Comments (10)
type phantomjs
in your console and see what you get?
from pyecharts-snapshot.
phantomjs is hashed (/usr/local/bin/phantomjs)
from pyecharts-snapshot.
your environment fails this test: https://github.com/pyecharts/pyecharts-snapshot/blob/master/pyecharts_snapshot/main.py#L174
if phantomjs
is accessible from the same console as you have above, the snapshot lib should find it.
FYI, I developed this library using macos too. Cannot believe it would go wrong.
from pyecharts-snapshot.
print(subprocess.check_output(["phantomjs","--version"],shell=False))
Traceback (most recent call last):
File "<pyshell#14>", line 1, in
print(subprocess.check_output(["phantomjs","--version"],shell=False))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 389, in check_output
**kwargs).stdout
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 466, in run
with Popen(*popenargs, **kwargs) as process:
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 769, in init
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1516, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'phantomjs': 'phantomjs'
shell=True
print(subprocess.check_output(["phantomjs","--version"],shell=True))
Traceback (most recent call last):
File "<pyshell#18>", line 1, in
print(subprocess.check_output(["phantomjs","--version"],shell=True))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 389, in check_output
**kwargs).stdout
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 481, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['phantomjs', '--version']' returned non-zero exit status 127.
from pyecharts-snapshot.
OK. Try these in your current shell with python enabled:
$ which phantomjs
$ snapshot one-of-your-render.html
Please share the console output with me.
from pyecharts-snapshot.
jindeMac-mini:~ jin$ which phantomjs
/usr/local/bin/phantomjs
jindeMac-mini:~ jin$ snapshot one-of-your-render.html
phantomjs version: 2.1.1
Generating file ...
Traceback (most recent call last):
File "/usr/local/bin/snapshot", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/pyecharts_snapshot/main.py", line 73, in main
make_a_snapshot(file_name, output, delay=delay, pixel_ratio=pixel_ratio)
File "/usr/local/lib/python3.7/site-packages/pyecharts_snapshot/main.py", line 119, in make_a_snapshot
raise OSError(content_array)
OSError: ["ReferenceError: Can't find variable: echarts\n\n undefined:1\nnull\n"]
from pyecharts-snapshot.
This means pyecharts-snapshot works and now if you provide an output of pyecharts, you should see a image output.
And if you run snapshot's demo scripts in your current shell, you will get image outputs.
from pyecharts-snapshot.
current shell is good
but use ide shell is fails
from pyecharts-snapshot.
Please configure your ide to be aware of your env PATH.
from pyecharts-snapshot.
ok
thank you very much
from pyecharts-snapshot.
Related Issues (20)
- svg的图表生成后不能交互 HOT 1
- pixel_ratio 应该作为可配置参数
- 能否添加一个函数,直接返回图片base64的编码? HOT 3
- 默认白色背景,保存成jpeg图片的时候,背景色变成黑色 HOT 2
- 无法生成png图片 HOT 14
- Wrong when running grid.py with python3.6 HOT 1
- Exception: No pyecharts_environment is found for png HOT 1
- OSError: ["ReferenceError: Can't find variable: echarts\n\n undefined:1\nnull\n"] HOT 4
- gif do not work HOT 1
- The file size is too big, any way to reduce? HOT 1
- how to use it in python? HOT 3
- 生成gif时,报错 HOT 4
- About the parameter delay
- pyppeteer.errors.BrowserError: Browser closed unexpectedly: HOT 5
- Use pyecharts-snapshot without browser HOT 1
- html转为svg格式后,svg文件打开不是图片,是一段代码 HOT 1
- 在不连网的情况下,在win10系统下,无法将html图片保存为本地图片,怎么正确添加js_host可以正常运行
- Can sankey plot be converted to vectorgraph like pdf or SVG file? HOT 1
- Scatter3D 生成png和pdf失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyecharts-snapshot.