mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
MinerU Plugin Bug: NameError: name 'File' is not defined #488
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rigelfalcon on GitHub (Jul 26, 2025).
Self Checks
Dify version
Version 1.6.0
Plugin version
MinerU 0.3.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
MinerU-Check.yml.txt
✔️ Error log
Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"NameError","message":"name 'File' is not defined"}
seems lost "from dify_plugin.file.file import File"
Paste your full Python code here
import base64
import io
import json
import logging
import os
import time
import zipfile
from collections.abc import Generator
from dataclasses import dataclass
from typing import Any, Dict, List, Optional
import httpx
from dify_plugin.invocations.file import UploadFileResponse
from requests import post, get, put
from dify_plugin import Tool
from dify_plugin.entities.tool import ToolInvokeMessage
from dify_plugin.errors.tool import ToolProviderCredentialValidationError
from yarl import URL
from dify_plugin.file.file import File # <--- This is the working import
@l241025097 commented on GitHub (Jul 27, 2025):
@chihosin commented on GitHub (Jul 28, 2025):
How to fix it at local docker container?
@rigelfalcon commented on GitHub (Jul 28, 2025):
@rigelfalcon commented on GitHub (Jul 28, 2025):
https://github.com/langgenius/dify-official-plugins/pull/1365
@l241025097 commented on GitHub (Jul 28, 2025):
mineru plugin update to 0.3.1, solved.