![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
zjjhwzl
这个作者很懒,什么都没留下…
展开
-
解决方案:AttributeError: ‘NoneType‘ object has no attribute ‘write‘
目前因为在制造型企业,python的服务使用flask开发,打包部署的方式是使用pyinstaller打包成exe程序,然后部署。经过各种折腾以后,解决方式pip指定其他版本的安装包。再次启动没有发现问题。原创 2023-01-12 08:51:31 · 4256 阅读 · 8 评论 -
python报too many open files...
今天多线程执行Python的文件分发模块,即使用sftp将多个文件分发到多台服务器上面,突然报这个错,后来发现是因为代码中没有关闭连接导致的transport = paramiko.Transport((hostInfo[0], 22))transport.banner_timeout = 30transport.connect(username=hostInfo[1], password=self.decrypt(hostInfo[2]))上面使用了transport对象,但是使用完以.原创 2020-10-31 14:52:56 · 1431 阅读 · 0 评论 -
AttributeError: ‘module‘ object has no attribute ‘GSSException‘
本篇不提供解决方案,只记录发生的过程,等找到解决方案再贴出来,需要解决方案的请直接 离开完整报错如下:Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.linux-x86_64/egg/paramiko/__init__.py", line 22, in <module> File "build/bdist.linux-x86...原创 2020-10-22 14:27:33 · 370 阅读 · 0 评论 -
python报错之paramiko.ssh_exception.SSHException: EOF during negotiation
方案1:此方法引自https://www.cnblogs.com/lidq/p/12030662.html 查找sftp-server的位置,find / -name sftp-server 然后查看ssh的配置文件,vim /etc/ssh/sshd_config 发现路径是相同的如果发现路径不相同,则需要重启服务 系统版本是7:systemctl restart sshd 系统版本是6:service sshd restart...原创 2020-10-21 10:37:21 · 5830 阅读 · 0 评论 -
ValueError: Data must be padded to 16 byte boundary in CBC mode
使用Python加密字符串,出现报错,上网搜索一番无果,但是自己测试的时候刚开始以为是字符串不能出现@#这样的特殊字符,因为我只要删除其中一个就可以加密了,后来偶然删除了其他的测试,发现又可以了,最终的原因就是加密的字符串太长了了,大于16位,我使用的是16位的,所以报错,本质原因没有细究。具体报错:Traceback (most recent call last): File "D:/software installation/AutoOperate/venv/Include/AutoO..原创 2020-10-15 10:10:18 · 5479 阅读 · 0 评论 -
Exception ignored in: <function BaseMySQLSocket.__del__ at 0x000002C85CBADF70> Traceback (most recen
今天使用Python实现模块化的功能,突然遇到的问题具体报错如下:Exception ignored in: <function BaseMySQLSocket.__del__ at 0x000002C85CBADF70>Traceback (most recent call last): File "D:\software installation\AutoOperate\venv\lib\site-packages\mysql\connector\network.py", li.原创 2020-10-11 01:16:45 · 4802 阅读 · 0 评论