随笔分类 -  Python

Python相关知识及工具使用等分享
Celery 在Windows下启动worker时出现错误:ValueError: not enough values to unpack (expected 3, got 0)
摘要:在公司Linux环境下没有出现问题,在回到家后直接在Windows10下运行出现错误: 可通过celery worker 的-P选项选择prefork的方式来解决: 点击查看详情 阅读全文

posted @ 2018-05-06 21:53 xzysaber 阅读(393) 评论(0) 推荐(0) 编辑

Python3 引入sqlite3时出现错误:ModuleNotFoundError: No module named '_sqlite3'
摘要:出现错误: 查看了多种解决方案,取最简单的一种: 无错误,即解决该问题。 阅读全文

posted @ 2018-04-13 11:56 xzysaber 阅读(2476) 评论(0) 推荐(0) 编辑

Selenium 错误处理之:stale element reference: element is not attached to the page document
摘要:出现该错误的原因是页面在获取到DOM元素之后到引用元素之间页面进行了刷新,所以需要再次获取该DOM元素即可。 阅读全文

posted @ 2017-07-07 14:04 xzysaber 阅读(736) 评论(0) 推荐(0) 编辑

Python3 使用requests请求,解码时出错:'utf8' codec can't decode byte 0x8b in position 1: invalid start byte
摘要:requests请求的响应内容能够通过几个属性获得: response.text 为解码之后的内容,解码会根据响应的HTTP Header中的Content-Type选择字符集。例如 就会使用“UTF-8”解码。可通过访问response.encoding获得当前使用的字符集。 也可修改使用的字符集 阅读全文

posted @ 2017-03-03 16:52 xzysaber 阅读(4707) 评论(0) 推荐(0) 编辑

'Service' object has no attribute 'process'
摘要:在使用selenium+phantomjs时,运行总是出现错误信息: 出现该错误的原因是未能找到可执行程序"phantomjs",这时可以这样: 也可以通过重启pycharm来解决ORZ。 阅读全文

posted @ 2017-01-09 15:20 xzysaber 阅读(673) 评论(0) 推荐(0) 编辑

selenium.common.exceptions.TimeoutException: Message: Screenshot: available via screen
摘要:在使用selenium+phantomjs的时候在Windows平台下能够正常工作,在Linux下却不能,并得到错误信息: 在ST上找到答案:http://stackoverflow.com/a/36159299/4447404 在初始化driver时传入参数"service_args=['--ig 阅读全文

posted @ 2017-01-09 15:13 xzysaber 阅读(11514) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示