hustcc / hustcc/PyG2Plot

selenium.common.exceptions.JavascriptException: Message: javascript error: echarts is not defined

Open
#33 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.1k
Forks
115
PR merge metrics
No merged PRs in 30d

Description

使用from snapshot_selenium import snapshot将得到的html转为图片,报错,
使用方法为pyecharts.render.make_snapshot(snapshot_selenium.snapshot, 'xxx.html', 'xxx.png')
```
Traceback (most recent call last):
File "/home/tests/test_1.py", line 20, in
make_snapshot(snapshot, '/home/plot.html', "bar0.png")
File "/usr/local/lib/python3.8/dist-packages/pyecharts/render/snapshot.py", line 32, in make_snapshot
content = engine.make_snapshot(
File "/usr/local/lib/python3.8/dist-packages/snapshot_selenium/snapshot.py", line 52, in make_snapshot
return driver.execute_script(snapshot_js)
File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 491, in execute_script
return self.execute(command, {
File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 428, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: javascript error: echarts is not defined
(Session info: headless chrome=104.0.5112.101)
Stacktrace:
#0 0x557451a50403
#1 0x557451856778
#2 0x557451859617
#3 0x5574518594c4
#4 0x55745185a07d
#5 0x5574518bf853
#6 0x5574518aba02
#7 0x5574518bec74
#8 0x5574518ab8f3
#9 0x5574518810d8
#10 0x557451882205
#11 0x557451a97e3d
#12 0x557451a9adb6
#13 0x557451a8113e
#14 0x557451a9b9b5
#15 0x557451a75970
#16 0x557451ab8228
#17 0x557451ab83bf
#18 0x557451ad2abe
#19 0x7f7f5964f609
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.