- 博客(10)
- 收藏
- 关注
原创 ssmtp 配置 smtp.exmail.qq.com遇到Cannot open smtp.exmail.qq.com:465问题
环境:Ubuntu 16.04.5 LTS把465改成587配置/etc/ssmtp/ssmtp.conf:# Config file for sSMTP sendmail## The person who gets all mail for userids < 1000# Make this empty to disable rewriting.root=y...
2018-08-21 20:11:55 12989
转载 数据库迁移工具 alembic 模仿git checkout 特定版本
alembic upgrade <target-revision> || alembic downgrade <target-revision>https://stackoverflow.com/questions/37035260/is-there-a-simple-way-to-tell-alembic-to-migrate-to-a-specific-revisio...
2018-06-15 16:26:51 397
原创 ImportError: No module named IPython.frontend.terminal.ipapp
环境:Ubuntu 12.04.5 LTS \n \l Python 2.7.13现象直接pip install ipython不能用 root@bdwaf:/usr/local/bluedon/python/cfpy/manager# ipython Traceback (most recent call last): File “/usr/bin/ipython”, line 5,
2017-12-27 19:41:35 3651
原创 某Python进程出现线程卡住情况的排查记录
现象:需要排查的进程同时运行多个线程,其中一个线程的日志停留在数日前,而其他线程可以正常运行,日志正常打印排查:观察线程信息: 可以使用top -H -p {进程id}命令获得该进程线程信息。排查当天15:09线程信息: 出问题服务器: 正常服务器(为了方便对比): 16:36线程信息: 出问题服务器: 正常服务器: 经过一番努力观察,发现出问题服务器3914这个
2017-09-01 17:20:19 15106
原创 为Python使用ssl连接kafka遇到的问题:Unrecognized command: -keystore
一天,我按照Connect to Apache Kafka from Python using SSL小心翼翼的尝试。在使用 # keytool -keystore server.keystore.jks -alias localhost -validity 365 -keyalg RSA -genkey 的时候报了如题的错误。方法:换个版本的java就好。sudo apt-get remov
2017-04-06 17:53:52 1964
原创 BeautifulSoup不能完整识别网页html代码
环境:Python版本:2.7.3>>> html = gethtml('http://www.joiway.com/')>>> soup = BeautifulSoup(html)>>> soup.find_all("a",href=True)[]>>> soup.find_all("a")[]>>> soup.find_all("link")[<link href="http://
2017-02-22 15:56:14 5254
原创 gevent和requests同时使用报requests.exceptions.ReadTimeout:HTTPSConnectionPool(host='www.baidu.com', port=4
最近项目需要用协程来处理网站并发访问,使用了Gevent这个库,访问网站用requests,然而访问https的url时报错:>>> from gevent import monkey; monkey.patch_socket()>>> import gevent>>> url='https://www.baidu.com'>>> requests.get(url)requests.excep
2017-02-20 13:42:41 14774
原创 Python2.7 安装mock出现AttributeError: 'module' object has no attribute的解决方法
原环境:1.pip --verson : 1.0 from /usr/lib/python2.7/dist-packages (python 2.7)2.uname -a :Linux pc 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux3.root权
2017-02-18 10:34:02 19567
原创 小谈应该如何对抗网络小说
今天元宵节本来想来公司好好自习,然而吃饭的时候习惯性把手机打开看起了小说, 这一看就看到了2点20分。 看着好像没看多久,其实后面几十分钟已经累了,想睡午觉了,还是强撑着用手机低头看小说。回顾下记忆, 貌似经常因为看小说晚睡,,有时候一看就是一天,弄的全身上下不舒服, 眼睛也要瞎了的才罢手( 难怪眼睛读数那么深)。为了惩罚自己又作孽看起了小说, 写下博文总结回顾下我那不太成功的应对小说的方式, 同
2017-02-11 15:22:49 435
原创 安装cuckoo的requirements.txt出现的问题和解决
安装Cuckoo Sandbox 2.0-rc1 需要的库直接 pip install -r requirements.txt -i http://pypi.douban.com/simple/ 会提示以下错误.Downloading/unpacking pefile from http://pefile.googlecode.com/files/pefile-1.
2016-10-26 09:23:15 1823
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人