Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug for MCP&API]: Slashes in text break local output file saving

オープン 初心者向け
#106 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@LingYi-Liang がすでに取り組んでいます。

2026年10月3日 から。

  • #107 @LingYi-Liang による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

minimax_mcp/utils.py の build_output_file() から始め、次に minimax_mcp/server.py のローカル保存パスを調べます。提供されている TemporaryDirectory スクリプトで問題を再現し、日付形式のスラッシュを含むテキストを対象とするリグレッションテストを追加します。両方の日付形式で、要求された出力ディレクトリ内に直接ファイルが生成され、書き込みが成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Text starting with a date like 2026/10/03 breaks local output saving for
text_to_audio (MINIMAX_API_RESOURCE_MODE=local).

build_output_file() takes the first 10 characters and only replaces spaces.
The result is t2a_2026/10/03_<timestamp>.mp3. The slashes are treated as path
separators, but those directories don't exist. Changing the date to 2026-10-03
lets the file save normally.

Reproduction

Run this from the repository root with the Python dependencies installed. It
imports the unmodified utility and writes test bytes directly to a temporary
directory, without calling the API. Both inputs use the same absolute output
path, which also avoids the separate path-joining issue.

from pathlib import Path
from tempfile import TemporaryDirectory

from minimax_mcp.utils import build_output_file, build_output_path

records = []
with TemporaryDirectory() as directory:
    output_path = build_output_path(str(Path(directory) / "output"))
    for text in ("2026-10-03", "2026/10/03"):
        output_file = build_output_file("t2a", text, output_path, "mp3")
        output_path.parent.mkdir(parents=True, exist_ok=True)
        try:
            with open(output_path / output_file, "wb") as stream:
                stream.write(b"local write probe")
            result = "saved"
        except OSError as error:
            result = type(error).__name__
        parent_matches = output_file.parent == output_path
        print(text, "parent_matches:", parent_matches, "write:", result)
        records.append({"text": text, "parent_matches": parent_matches, "write": result})

Both runs gave this output:

2026-10-03 parent_matches: True write: saved
2026/10/03 parent_matches: False write: FileNotFoundError

Both inputs should save directly inside the requested directory.

Environment

Windows, Python 3.11.9, package version 0.0.19 at
0856b9aef8a9d676bb63bdd6b6426d7b640a3b7a.
Models used and Trace-ID: N/A (local reproduction, no request).

The relevant code is filename construction
and the local audio save path.

I've checked the Python/JS READMEs, MCP guide and existing issues. #73/#74 address
repeated path joining, and #92 covers nested-directory writability; none changes
how text becomes a filename.

Would you be open to a small fix that replaces path separators in the text,
keeps ordinary Unicode characters, and adds a file-write regression test?

主要言語
Python
スター
1.6k
フォーク
284
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MiniMax-AI/MiniMax-MCP のほかの issue

MiniMax-AI/MiniMax-MCP の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。