mouxangithub/midjourney-proxy-on-wechat

更新后 $mj_help 报错。

Closed this issue · 2 comments

chatgpt-on-wechat | [ERROR][2023-08-05 01:48:20][chat_channel.py:270] - Worker return exception: '_mjApi' object has no attribute 'reroll_prefix'
chatgpt-on-wechat | Traceback (most recent call last):
chatgpt-on-wechat | File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
chatgpt-on-wechat | result = self.fn(*self.args, **self.kwargs)
chatgpt-on-wechat | File "/app/channel/chat_channel.py", line 146, in _handle
chatgpt-on-wechat | reply = self._generate_reply(context)
chatgpt-on-wechat | File "/app/channel/chat_channel.py", line 156, in _generate_reply
chatgpt-on-wechat | e_context = PluginManager().emit_event(
chatgpt-on-wechat | File "/app/plugins/plugin_manager.py", line 189, in emit_event
chatgpt-on-wechat | instance.handlers[e_context.event](e_context, *args, **kwargs)
chatgpt-on-wechat | File "/app/plugins/midjourney-proxy-on-wechat/midjourney.py", line 168, in on_handle_context
chatgpt-on-wechat | return self.handle_command(e_context)
chatgpt-on-wechat | File "/app/plugins/midjourney-proxy-on-wechat/midjourney.py", line 350, in handle_command
chatgpt-on-wechat | return Info(get_help_text(self, verbose=True, isadmin=True), e_context)
chatgpt-on-wechat | File "/app/plugins/midjourney-proxy-on-wechat/ctext.py", line 381, in get_help_text
chatgpt-on-wechat | help_text = self.mj.help_text()
chatgpt-on-wechat | File "/app/plugins/midjourney-proxy-on-wechat/mjapi.py", line 320, in help_text
chatgpt-on-wechat | help_text += f"(8) reroll重新生成:使用['{self.reroll_prefix[0]}' + 任务ID操作]即可重新绘制图片\n"
chatgpt-on-wechat | AttributeError: '_mjApi' object has no attribute 'reroll_prefix'

试了一下,少了一行,config.json也没更新。就不提PR了。

self.reroll_prefix = config['reroll_prefix']

新增了reroll_prefix