djangonauts / djorm-ext-pool

DB-API2 connection pool for Django (for postgresql, mysql and sqlite)
Other
126 stars 25 forks source link

TypeError: '<' not supported between instances of 'type' and 'type' #12

Open Seifon opened 5 years ago

Seifon commented 5 years ago

按照您的教程加入后,启动报这个错误

Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python37\lib\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\Python37\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
    fn(*args, **kwargs)
  File "C:\Program Files\Python37\lib\site-packages\django\core\management\commands\runserver.py", line 120, in inner_run
    self.check_migrations()
  File "C:\Program Files\Python37\lib\site-packages\django\core\management\base.py", line 453, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\loader.py", line 49, in __init__
    self.build_graph()
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\loader.py", line 212, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\recorder.py", line 73, in applied_migrations
    if self.has_table():
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\recorder.py", line 56, in has_table
    return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor())
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\base\base.py", line 256, in cursor
    return self._cursor()
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\base\base.py", line 233, in _cursor
    self.ensure_connection()
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\base\base.py", line 217, in ensure_connection
    self.connect()
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\base\base.py", line 195, in connect
    self.connection = self.get_new_connection(conn_params)
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\mysql\base.py", line 227, in get_new_connection
    return Database.connect(**conn_params)
  File "C:\project\qhlive_python\djorm_pool\__init__.py", line 84, in connect
    return self.manager.connect(*args, **kwargs)
  File "C:\Program Files\Python37\lib\site-packages\sqlalchemy\pool.py", line 1427, in connect
    return self.get_pool(*args, **kw).connect()
  File "C:\Program Files\Python37\lib\site-packages\sqlalchemy\pool.py", line 1398, in get_pool
    return self.pools[key]
  File "C:\project\qhlive_python\djorm_pool\__init__.py", line 52, in __hash__
    return hash(tuple(sorted(self.items())))
TypeError: '<' not supported between instances of 'type' and 'type'
auvipy commented 5 years ago

TypeError: '<' not supported between instances of 'type' and 'type'

Yovj commented 5 years ago

按照您的教程加入后,启动报这个错误

Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python37\lib\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\Python37\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
    fn(*args, **kwargs)
  File "C:\Program Files\Python37\lib\site-packages\django\core\management\commands\runserver.py", line 120, in inner_run
    self.check_migrations()
  File "C:\Program Files\Python37\lib\site-packages\django\core\management\base.py", line 453, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\loader.py", line 49, in __init__
    self.build_graph()
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\loader.py", line 212, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\recorder.py", line 73, in applied_migrations
    if self.has_table():
  File "C:\Program Files\Python37\lib\site-packages\django\db\migrations\recorder.py", line 56, in has_table
    return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor())
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\base\base.py", line 256, in cursor
    return self._cursor()
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\base\base.py", line 233, in _cursor
    self.ensure_connection()
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\base\base.py", line 217, in ensure_connection
    self.connect()
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\base\base.py", line 195, in connect
    self.connection = self.get_new_connection(conn_params)
  File "C:\Program Files\Python37\lib\site-packages\django\db\backends\mysql\base.py", line 227, in get_new_connection
    return Database.connect(**conn_params)
  File "C:\project\qhlive_python\djorm_pool\__init__.py", line 84, in connect
    return self.manager.connect(*args, **kwargs)
  File "C:\Program Files\Python37\lib\site-packages\sqlalchemy\pool.py", line 1427, in connect
    return self.get_pool(*args, **kw).connect()
  File "C:\Program Files\Python37\lib\site-packages\sqlalchemy\pool.py", line 1398, in get_pool
    return self.pools[key]
  File "C:\project\qhlive_python\djorm_pool\__init__.py", line 52, in __hash__
    return hash(tuple(sorted(self.items())))
TypeError: '<' not supported between instances of 'type' and 'type'

我也遇到这个错误了,请问您解决了吗?是怎么回事呀

zhouxiangjing commented 4 years ago

我遇到了同样的问题,希望能解答,谢谢!

caoshitong369 commented 3 years ago

return hash(frozenset(self))

Allan-Nava commented 3 years ago

I have the same error: TypeError: '<' not supported between instances of 'type' and 'type'

xfz2012 commented 3 years ago

return hash(frozenset(self))

这个可以解决问题

auvipy commented 3 years ago

the package need some serious upgrade works so wait for that or help me to fix them

68110923 commented 2 years ago

返回哈希(冻结集(自我))

这个可以解决问题

怎么解决呢 修改源码吗

auvipy commented 2 years ago

english please!