报错:

Unhandled exception in thread started by <function wrapper at 0x2d7e410>
Traceback (most recent call last):
File "/root/virtual_dir/wxwebapp_court_nositepkg/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
.......................省略N多行
File "/usr/local/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
.......................省略N多行,重复报上面的错
RuntimeError: maximum recursion depth exceeded in cmp
解决办法:在python目录中的Lib下面找到functools将56行
convert = {
'__lt__': [('__gt__', lambda self, other: other < self),
('__le__', lambda self, other: not other < self),
('__ge__', lambda self, other: not self < other)],
'__le__': [('__ge__', lambda self, other: other <= self),
('__lt__', lambda self, other: not other <= self),
('__gt__', lambda self, other: not self <= other)],
'__gt__': [('__lt__', lambda self, other: other > self),
('__ge__', lambda self, other: not other > self),
('__le__', lambda self, other: not self > other)],
'__ge__': [('__le__', lambda self, other: other >= self),
('__gt__', lambda self, other: not other >= self),
('__lt__', lambda self, other: not self >= other)]
}
修改成:
convert = {
'__lt__': [('__gt__', lambda self, other: not (self < other or self == other)),
('__le__', lambda self, other: self < other or self == other),
('__ge__', lambda self, other: not self < other)],
'__le__': [('__ge__', lambda self, other: not self <= other or self == other),
('__lt__', lambda self, other: self <= other and not self == other),
('__gt__', lambda self, other: not self <= other)],
'__gt__': [('__lt__', lambda self, other: not (self > other or self == other)),
('__ge__', lambda self, other: self > other or self == other),
('__le__', lambda self, other: not self > other)],
'__ge__ ': [('__le__', lambda self, other: (not self >= other) or self == other),
('__gt__', lambda self, other: self >= other and not self == other),
('__lt__', lambda self, other: not self >= other)]
}
解决!

转载于:https://www.cnblogs.com/myparadiseworld/p/6961338.html

python+pycharm+Django报错相关推荐

  1. 【Python】django报错:TypeError: __init__() missing 1 required positional argument: 'on_delete'解决办法

    错误代码: from __future__ import unicode_literals from django.db import models from django.utils.encodin ...

  2. Python PyCharm Django 搭建web开发环境

    Python & PyCharm & Django 搭建web开发环境 一.安装软件 1.安装 Python 2.7.PyCharm.pip(Python包管理工具).Django ( ...

  3. pycharm运行报错:Process finished with exit code -1073741515 (0xC0000135)

    pycharm运行报错:Process finished with exit code -1073741515 (0xC0000135) 是因为python版本太低,版本升级即可. 一.官网下载最新的 ...

  4. python读取表格报错:xlrd.biffh.XLRDError:Excel xlsx file;not support

    python读取表格报错 当你间歇性踌躇满志的打开pycharm,看了一篇python+unittest+request接口自动化测试框架,你觉得有必要站在巨人的肩膀上眺望一下远方,于是你按步骤走到了 ...

  5. python导入turtle报错,Python turtle

    python flask 全局变量需要加锁吗 python flask 全局变量需要加锁吗 搜索资料 我来答 分享 微信扫一扫 新浪微博 QQ空间 举报 浏览35 次 本地图片 图片链接 代码 提交 ...

  6. python调用dll报错:ValueError: Procedure called with not enough arguments (4 bytes missing) or wrong call

    python调用dll报错:ValueError: Procedure called with not enough arguments (4 bytes missing) or wrong call ...

  7. python导入openpyxl报错问题,终于解决啦

    python导入openpyxl报错问题,终于解决啦 参考文章: (1)python导入openpyxl报错问题,终于解决啦 (2)https://www.cnblogs.com/guotang/p/ ...

  8. Python 中文注释报错解决方法

    Python 中文注释报错解决方法 参考文章: (1)Python 中文注释报错解决方法 (2)https://www.cnblogs.com/cjiong/p/5881983.html 备忘一下.

  9. python安装报错类型_解决Python安装cryptography报错问题

    解决Python安装cryptography报错问题 错误一: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wst ...

最新文章

  1. windows平台,开发环境变量配置
  2. influxdb java spring_Spring boot使用influxDB总结
  3. 淘宝的人工封IP技术真好玩
  4. QWSLock::up(): Invalid argument
  5. 《R语言实战》第6章
  6. Django2.2安装
  7. [005] .NET 的执行模型
  8. git bash卡顿解决
  9. PID控制器改进笔记之三:改进PID控制器之正反作用
  10. 数据安全治理的几个基本问题
  11. what's new in vs 2005
  12. mysql 5.1 concat min_MySQL 5.1+ 数据库报错注入利用
  13. 教师计算机应用研讨交流,计算机应用技术专业技能比赛研讨交流活动在济南信息工程学校举行...
  14. 客户端父进程提前死亡
  15. conda pip 安装NumPy速度不佳解决方案
  16. 管理感悟:一偷懒,必出错
  17. 记账系统(java)
  18. android 融云数据库路径,Android开发规范
  19. Topaz 全家桶最新中文版分享
  20. RabbitMQ之发布确认

热门文章

  1. React with Webpack - 3: 内联image、font
  2. asp.net 中ascx、asmx、ashx等文件类型说明
  3. 【Transformer】ViT:An image is worth 16x16: transformers for image recognition at scale
  4. 机器学习实战(十)利用K-means算法对未标注数据分组
  5. 鄂尔多斯借贷迷局:1亿存款被冻结3年无法拿回
  6. 映射技术之储存器映射
  7. 编码gbk的不可映射字符_Python基础:编码表和字符的故事
  8. python time 语句_python的time模块总结
  9. cad线性标注命令_CAD常用标注快捷键和命令
  10. python函数的作用域_python函数的作用域和引用范围