Mongodb always reports an error when building an index

index = self.xiaomiquan_collection.create_index(
                [("unique_charcter", pymongo.DESCENDING), ("name", 1)], unique=True)
            res = self.xiaomiquan_collection.find(index)

Traceback (most recent call last):
  File "/home/shenjianlin/.local/lib/python3.4/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/home/shenjianlin/my_project/Espider/Espider/pipelines/XiaoMiQuanPipelines.py", line 14, in process_item
    [("unique_charcter", pymongo.DESCENDING), ("name", pymongo.HASHED)], {"unique": True})
  File "/usr/lib64/python3.4/site-packages/pymongo/collection.py", line 1754, in create_index
    self.__create_index(keys, kwargs, session, **cmd_options)
  File "/usr/lib64/python3.4/site-packages/pymongo/collection.py", line 1656, in __create_index
    session=session)
  File "/usr/lib64/python3.4/site-packages/pymongo/collection.py", line 245, in _command
    retryable_write=retryable_write)
  File "/usr/lib64/python3.4/site-packages/pymongo/pool.py", line 484, in command
    self.validate_session(client, session)
  File "/usr/lib64/python3.4/site-packages/pymongo/pool.py", line 630, in validate_session
    if session._client is not client:
AttributeError: "dict" object has no attribute "_client"


Sep.29,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8b63-1ef8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8b63-1ef8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?