Red-discordbot: Mongo error in modlog._init

Created on 26 Jun 2019  路  5Comments  路  Source: Cog-Creators/Red-DiscordBot

Other bugs

What were you trying to do?

Start the bot

What were you expecting to happen?

What actually happened?

Traceback (most recent call last):
  File "/home/zephyrkul/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/zephyrkul/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/redbot/__main__.py", line 175, in <module>
    main()
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/redbot/__main__.py", line 120, in main
    loop.run_until_complete(modlog._init())
  File "uvloop/loop.pyx", line 1451, in uvloop.loop.Loop.run_until_complete
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/redbot/core/modlog.py", line 65, in _init
    await _migrate_config(from_version=await _conf.schema_version(), to_version=_SCHEMA_VERSION)
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/redbot/core/modlog.py", line 75, in _migrate_config
    await _conf.custom(_CASETYPES).set(all_casetypes)
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/redbot/core/config.py", line 455, in set
    await super().set(value)
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/redbot/core/config.py", line 165, in set
    await self.driver.set(self.identifier_data, value=value)
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/redbot/core/drivers/red_mongo.py", line 202, in set
    async for document in mongo_collection.find(pkey_filter, session=session):
  File "<string>", line 7, in __anext__
  File "/home/zephyrkul/.pyenv/versions/3.7.3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/pymongo/cursor.py", line 1104, in _refresh
    self.__send_message(q)
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/pymongo/cursor.py", line 982, in __send_message
    helpers._check_command_response(first)
  File "/home/zephyrkul/.pyenv/versions/red-V3-3.7.3/lib/python3.7/site-packages/pymongo/helpers.py", line 155, in _check_command_response
    raise OperationFailure(msg % errmsg, code, response)
pymongo.errors.OperationFailure: afterClusterTime cannot be a null timestamp

How can we reproduce this issue?

Have latest dev version
Have mongo
Start bot

Most helpful comment

Upgrading Mongo fixed this.

All 5 comments

@zephyrkul What is your MongoDB version?

To me this looks like an error in MongoDB which was fixed in version 3.5.10 https://jira.mongodb.org/browse/SERVER-29988

I wouldn't have a clue where to start if it was a bug in our code :eyes: That bug report above is the only thing on the internet that talks about this error message

3.6.3

I don't mean to be a pain, but could you try updating Mongo to 4.0 and see if it fixes the issue?

Upgrading Mongo fixed this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SieBrum picture SieBrum  路  3Comments

lifehome picture lifehome  路  4Comments

clovisd picture clovisd  路  3Comments

mikeshardmind picture mikeshardmind  路  3Comments

IdkGoodName picture IdkGoodName  路  3Comments