自己也查阅了自己出现了的问题,其中就有这么个按照书中来写的代码但是Django却是提示了  ‘learning_logs ’is not a registered namespace. 然后错误提示可以是定位到了以下这个位置: base.html ``` <p> <a href="{% url 'learning_logs:index' %}">Learning Log</a>- <a href="{% url 'learning_l…
解决方法就是: from django.urls import reverse 最近从django1.9迁移到django2.0中出现一个意外的报错: 这个报错的原因在stack overflow上有很直接的解释,但是百度上并没有直接的答案. 简单来说,原因就是:django2.0 把原来的 django.core.urlresolvers 包 更改为了 django.urls包,所以我们需要把导入的包都修改一下就可以了.…
python读取文件报错UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in position 2: illegal multibyte sequence 示例代码: fileName = 'E:/2/采集数据_pswf12_180大0小35750_20181206.txt' currentFile = open(fileName) content = currentFile.read() print(content) 报错原因: 要…
python安装tensorflow报错:python No matching distribution found for tensorflow==1.12.0 python版本是3.7.2 要安装的tensorflow版本是1.12.0 pip版本是18.1 安装操作是在pycharm上进行操作的. 但是一安装就报错:python No matching distribution found for tensorflow==1.12.0 解决办法: 将python进行退版本,也就是卸载当前这…
1.mac下python环境pip报错: issuserdeMacBook-Pro:~ issuser$ pip install pyinstallerCollecting pyinstaller  Could not fetch URL https://pypi.python.org/simple/pyinstaller/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSIO…
Django中修改DATABASES后,执行python manage.py ****报错!UnicodeEncodeError: 'latin-1' codec can't encode character '\u2028' in position 9:ordinal not in range(256). 为了这个错误找了无数网页,花费数小时,结果在于配置的用户名密码是从微信电脑端上面复制过来的,里面有个分隔符(‘\u2028’),愚蠢的人类终于被自己蠢哭了!!! 解决方案:老老实实自己输入,…
python 安装模块报错 Exception:Traceback (most recent call last): File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py", line 302, in _error_catcher yield File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any…
导入Beautifulsoup 报错 AttributeError: 'module' object has no attribute '_base' 解决方法:   pip install --upgrade beautifulSoup4 pip install --upgrade html5lib…
MongoDB解压报错gzip: stdin: not in gzip format的解决方法 在安装MongoDB时出现如下报错: [root@vm172--- mongodb]# tar -zxvf mongodb-linux-x86_64-.tgz gzip: stdin: not in gzip format tar: Child returned status tar: Error is not recoverable: exiting now 出现这种错误的排查方法如下: 1.用重命…
excel第一次打开报错 向程序发送命令时出错 多种解决办法含终极解决方法 office2007应该遇到“向程序发送命令时出现 问题”,设置为以管理员运行也不好用,重装office也不好用,下面介绍下解决办法. 击左上角的OFFICE图示,选择--Excel选项 选择--高级,并向下拖动滚动条 找到“忽略使用动态数据交换(DDE)的其他应用程序”,将前面的勾去掉,单击--确定 修改完毕,重新打开文件正常显示 些朋友们的excel表使用上述方法不好用,下面再介绍下另一种方法: 依次选中--加载项-…