- 博客(4)
- 资源 (4)
- 收藏
- 关注
原创 爬虫过程报错:http.client.RemoteDisconnected: Remote end closed connection without response
import urllibfrom urllib import requestpage = 1url = 'http://www.qiushibaike.com/hot/page/'+str(page)#url = 'http://www.baidu.com'try: req = request.Request(url) response = request.urlopen(req...
2017-03-07 19:55:50
27601
原创 django连接数据库问题
第一次进行django开发,连接数据库时发生很多问题,大多数是版本问题,Python3.x相对于python2.x中的ConfigParser全部改成小写了,说明pip中的mysql-python不支持python3.x,在以下博主的博文中解决问题,这里找到一个支持3.x的驱动-PyMySQL(https://github.com/PyMySQL/PyMySQL )。具体解决方案在下面连接。非常感
2017-03-06 12:07:27
404
原创 Django1.8与1.10中urlpatterns区别
python3.6 Django版本1.10在菜鸟教程中的Django教程中点击打开链接有如下代码:from django.conf.urls import *from HelloWorld.view import hellourlpatterns = patterns("", ('^hello/$', hello),)运行后出现NameError:NameErr
2017-03-05 22:41:24
5984
原创 python:SyntaxError:Missing parentheses in call to 'print'
问题 print "hello world"出现SyntaxError: Missing parentheses in call to 'print'原因:python版本问题,2和3,python2系列可以支持 print “xxxx” ,python3系列需要使用print("xxx")
2016-12-10 23:03:12
567
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人