三味的小站

Python/Win7 Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception

Python 3.8 + Win7,执行程序时报错: Traceback (most recent call last): File "PyInstaller\loader\pyiboot01_bootstrap.py", line 111, in <module> File "PyInst

三味线 Published on 2024-08-20

Python/Win7 ImportError: DLL load failed while importing _socket

Python 3.8 + Win7,执行程序时报错: Traceback (most recent call last): File "F:\toplinker\timp\python\lib\runpy.py", line 194, in _run_module_as_main ret

三味线 Published on 2023-12-20

HTML转图片

pyecharts+snapshot_selenium的方式只能将图表转为图片,html中的其他元素会被忽略,几番查找后发现imgkit效果还可以(win10和centos7测试OK) 首先需安装imgkit工具:https://wkhtmltopdf.org/downloads.html 下载对应

三味线 Published on 2023-09-07

smtplib发邮件发件人乱码问题

常规的发邮件代码如下: import smtplib from typing import Dict, List, Any from email.mime.text import MIMEText from email.mime.base import MIMEBase from email.mim

三味线 Published on 2023-04-11

python requests 请求传参数空格处理

import json import urllib import requests param1 = {'name': 'hello world'} param2 = urllib.parse.urlencode({'name': 'hello world'}, quote_via=urllib.p

三味线 Published on 2020-06-06

Python发送邮件

#!/usr/bin/python # -*- coding: UTF-8 -*- import smtplib from email.mime.text import MIMEText from email.header import Header # 第三方 SMTP 服务 mail_host

三味线 Published on 2020-04-27