小编use*_*148的帖子

由于 WiredTiger.turtle 权限,Mongodb 无法启动

我正在尝试在 ubuntu 16.04 上启动 mongodb 4.0.4,但数据库拒绝了我的所有尝试。我检查了 mongodb 日志文件,发现名为 WiredTiger.turtle 的文件没有所需的权限。这里记录错误:

2018-11-26T15:14:32.438+0600 E STORAGE  [initandlisten] WiredTiger error (13) [1543223672:438144][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1543223672:438144][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2018-11-26T15:14:32.438+0600 E STORAGE  [initandlisten] WiredTiger error (13) [1543223672:438429][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1543223672:438429][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2018-11-26T15:14:32.438+0600 E STORAGE  [initandlisten] WiredTiger error (13) [1543223672:438594][32673:0x7fee423e3a40], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1543223672:438594][32673:0x7fee423e3a40], …
Run Code Online (Sandbox Code Playgroud)

mongodb wiredtiger ubuntu-16.04 mongodb4.0

13
推荐指数
2
解决办法
7829
查看次数

在某些消息电报机器人之后保存用户输入

我正在使用pyTelegramBotAPI框架在python上构建一些电报机器人。而且我遇到了用户输入问题。我需要在某些漫游器消息后保存用户输入(可以是任何文本)。例如:

Bot:-请描述您的问题。

用户:-我们的计算机无法正常工作。

然后,我需要将“我们的计算机无法工作”这一文本保存到某个变量中,然后继续下一步。这是我的代码:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import telebot
import constants
from telebot import types

bot = telebot.TeleBot(constants.token)

@bot.message_handler(commands=['start'])
def handle_start(message):
    keyboard = types.InlineKeyboardMarkup()
    callback_button = types.InlineKeyboardButton(text="Help me!", callback_data="start")
    keyboard.add(callback_button)
    bot.send_message(message.chat.id, "Welcome I am helper bot!", reply_markup=keyboard)



@bot.inline_handler(lambda query: len(query.query) > 0)
def query_text(query):
    kb = types.InlineKeyboardMarkup()
    kb.add(types.InlineKeyboardButton(text="Help me!", callback_data="start"))
    results = []
    single_msg = types.InlineQueryResultArticle(
        id="1", title="Press me",
        input_message_content=types.InputTextMessageContent(message_text="Welcome I am helper bot!"),
        reply_markup=kb
    )
    results.append(single_msg)
    bot.answer_inline_query(query.id, results)

@bot.callback_query_handler(func=lambda call: True)
def callback_inline(call): …
Run Code Online (Sandbox Code Playgroud)

python user-interaction python-telegram-bot telegram-bot

5
推荐指数
2
解决办法
7648
查看次数