![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
Riky11
这个作者很懒,什么都没留下…
展开
-
python3 urlopen打开包含中文的url
当使用urllib.request.urlopen打开包含中文的链接时报错:from urllib import requesturl = 'https://baike.baidu.com/item/糖尿病'response = request.urlopen(url)提示错误:UnicodeEncodeError: ‘ascii’ codec can’t encode characters in原创 2017-11-05 15:25:25 · 9172 阅读 · 0 评论 -
在权限不够的linux服务器上自定义jieba分词的tmp_dir和cache_file属性
用anaconda3在个人目录下配置的局部python3环境,在这个环境下用jieba进行分词。报错:Building prefix dict from the default dictionary ...Loading model from cache /tmp/jieba.cacheDumping model to file cache /tmp/jieba.cacheDump cache原创 2017-11-22 11:28:06 · 9531 阅读 · 11 评论