我尝试使用Python库Chartify(Py3),但是当我试图将我的图形显示为“png”时,我得到了一个错误。在
# Generate example data
data = chartify.examples.example_data()
# Plot the data
ch = chartify.Chart(blank_labels=True, x_axis_type='datetime')
ch.plot.scatter(data_frame=data,x_column='date',y_column='unit_price')
ch.set_title("Scatterplot")
ch.set_subtitle("Plot two numeric values.")
ch.show('png')
错误如下:
WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
我已经下载了chromedriver并把它放在我的路径上。我使用os.path.exists
验证了它在我的路径中。我的Chrome浏览器是最新的(Mac)。当我运行下面的代码时,我得到了与上面相同的错误。在
我错过了什么?谢谢你的帮助!在
看起来您将
'my_path'
作为字符串,而不是变量my_path
我建议将路径作为
executable_path
的参数传递这是正确的代码。在
from selenium import webdriver driver = webdriver.Chrome(executable_path=(my_path + '/chromedriver)')
相关问题 更多 >
编程相关推荐