zvtvz / zvt

modular quant framework.
https://zvt.readthedocs.io/en/latest/
MIT License
3.13k stars 856 forks source link

[bug]informer模块报错 #89

Closed scanfyu closed 4 years ago

scanfyu commented 4 years ago

报错内容:server_hostname cannot be an empty string or start with a leading dot.

原因与解决: 当你遇到这个问题,你很有可能和我一样使用了python3.7。 python 3.7 修改了 ssl.py 导致了 smtplib.SMTP_SSL 的问题,如果按照原来的 import smtplib smtplib.SMTP_SSL().connect(host='smtp.gmail.com', port=465) 会报错 ValueError: server_hostname cannot be an empty string or start with a leading dot.

解决方法: import smtplib smtplib.SMTP_SSL(host='smtp.gmail.com').connect(host='smtp.gmail.com', port=465)

其他需修改部分: ZVT_HOME:config.json的"smtp_port": "80",需改为"smtp_port": "465"

记录。

doncat99 commented 4 years ago

python3.8沒問題

foolcage commented 4 years ago

最新版本已修复。