pandas使用相关报错集锦
一、报错:can't multiply sequence by non-int of type 'numpy.float64'
无法将序列乘以’numpy.float64’类型的非整数
解决方案:
网上大部分解决方案是需要将需要相乘的数类型改为Int;但是对于金额来说必须保证精确;所以建议是:先将数字相乘在用Decimal
函数保留2位小数
Decimal(总费用 / 点击次数总和).quantize(Decimal('0.00'))
二、打包exe报错: pyinstaller ModuleNotFoundError: No module named 'PyQt5'
解决方案:
检查一下pyinstaller的路径是否在虚拟环境中
在虚拟环境上重新 pip install pyinstaller
三、pyinstaller打包exe报错:‘NoneType‘ object has no attribute ‘write‘
解决方案:pip install pyinstaller==5.4.0
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »