Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Seifon opened this issue May 28, 2019 · 9 comments
Open

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

Seifon opened this issue May 28, 2019 · 9 comments

Comments

@Seifon
Copy link

Seifon commented May 28, 2019

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

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
Copy link
Collaborator

auvipy commented May 28, 2019

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

@Yovj
Copy link

Yovj commented Oct 22, 2019

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

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
Copy link

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

@caoshitong369
Copy link

return hash(frozenset(self))

@Allan-Nava
Copy link

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

@xfz2012
Copy link

xfz2012 commented Sep 17, 2021

return hash(frozenset(self))

这个可以解决问题

@auvipy
Copy link
Collaborator

auvipy commented Sep 17, 2021

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

@68110923
Copy link

68110923 commented Dec 1, 2021

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

这个可以解决问题

怎么解决呢 修改源码吗

@auvipy
Copy link
Collaborator

auvipy commented Dec 11, 2021

english please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants