当前位置:论坛首页 > BUG提交 > Linux面板

mongodb开启replication,查看数据库报错

发表在 BUG提交2023-4-5 13:29 [复制链接] 1 1483

本帖最后由 宝塔用_9b84 于 2023-4-5 13:34 编辑

操作系统:debian11
操作:开启replication

  1. #operationProfiling:
  2. replication:
  3.     replSetName: bt_main   
复制代码

错误:
  1. Traceback (most recent call last):
  2.   File "class/public.py", line 277, in dumps
  3.     return json.dumps(data)
  4.   File "/www/server/panel/pyenv/lib/python3.7/json/__init__.py", line 231, in dumps
  5.     return _default_encoder.encode(obj)
  6.   File "/www/server/panel/pyenv/lib/python3.7/json/encoder.py", line 199, in encode
  7.     chunks = self.iterencode(o, _one_shot=True)
  8.   File "/www/server/panel/pyenv/lib/python3.7/json/encoder.py", line 257, in iterencode
  9.     return _iterencode(o, 0)
  10.   File "/www/server/panel/pyenv/lib/python3.7/json/encoder.py", line 179, in default
  11.     raise TypeError(f'Object of type {o.__class__.__name__} '
  12. TypeError: Object of type Timestamp is not JSON serializable

  13. During handling of the above exception, another exception occurred:

  14. Traceback (most recent call last):
  15.   File "class/public.py", line 279, in dumps
  16.     return json.dumps(data, ensure_ascii=False)
  17.   File "/www/server/panel/pyenv/lib/python3.7/json/__init__.py", line 238, in dumps
  18.     **kw).encode(obj)
  19.   File "/www/server/panel/pyenv/lib/python3.7/json/encoder.py", line 199, in encode
  20.     chunks = self.iterencode(o, _one_shot=True)
  21.   File "/www/server/panel/pyenv/lib/python3.7/json/encoder.py", line 257, in iterencode
  22.     return _iterencode(o, 0)
  23.   File "/www/server/panel/pyenv/lib/python3.7/json/encoder.py", line 179, in default
  24.     raise TypeError(f'Object of type {o.__class__.__name__} '
  25. TypeError: Object of type Timestamp is not JSON serializable

  26. During handling of the above exception, another exception occurred:

  27. Traceback (most recent call last):
  28.   File "/www/server/panel/BTPanel/__init__.py", line 1850, in publicObject
  29.     res = run_obj.run(toObject, defs, get)
  30.   File "/www/server/panel/BTPanel/__init__.py", line 1801, in run
  31.     result = public.GetJson(result), json_header
  32.   File "class/public.py", line 291, in GetJson
  33.     data = ijson_obj.dumps(data)
  34.   File "class/public.py", line 281, in dumps
  35.     return json.dumps(self.returnMsg(False, "错误的响应: %s" % str(data)))
  36. AttributeError: 'ijson' object has no attribute 'returnMsg'
复制代码



截图_2023-04-05_13-33-25.png 截图_2023-04-05_13-33-00.png 截图_2023-04-05_13-32-32.png
使用道具 举报 只看该作者 回复
发表于 2023-4-13 13:05:21 | 显示全部楼层
解决了吗
使用道具 举报 回复
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理

工作时间:09:00至24:00

快速回复 返回顶部 返回列表