【发布时间】:2018-09-19 19:51:11
【问题描述】:
我有以下代码
from mysql.connector import MySQLConnection, Error
from yahoofinancials import YahooFinancials
yahoo_financials = YahooFinancials('AAPL')
historical_stock_prices = yahoo_financials.get_prev_close_price()
此代码导致以下错误消息:
OSError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
代码在不导入 MySQLConnection 的情况下运行良好,但我稍后需要 MySQLConnection。此外,在我的机器上,MySQLConnection 在另一个没有 YahooFinancials 的 python 脚本中工作。
【问题讨论】:
标签: python ssl ssl-certificate yahoo-finance mysqlconnection