Code Monkey home page Code Monkey logo

Comments (10)

chfw avatar chfw commented on June 12, 2024

type phantomjs in your console and see what you get?

from pyecharts-snapshot.

killalarm avatar killalarm commented on June 12, 2024

phantomjs is hashed (/usr/local/bin/phantomjs)

from pyecharts-snapshot.

chfw avatar chfw commented on June 12, 2024

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.

killalarm avatar killalarm commented on June 12, 2024

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.

chfw avatar chfw commented on June 12, 2024

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.

killalarm avatar killalarm commented on June 12, 2024

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.

chfw avatar chfw commented on June 12, 2024

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.

killalarm avatar killalarm commented on June 12, 2024

current shell is good
but use ide shell is fails

from pyecharts-snapshot.

chfw avatar chfw commented on June 12, 2024

Please configure your ide to be aware of your env PATH.

from pyecharts-snapshot.

killalarm avatar killalarm commented on June 12, 2024

ok
thank you very much

from pyecharts-snapshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.