From fed7539d923760d5870c665da9990b5d9ce687eb Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Sat, 21 Jun 2025 09:12:53 +0200 Subject: [PATCH] fix(creating-the-mcp-server.mdx): update import for HfHubHTTPError Update import path for HfHubHTTPError Fix the following error reported by Pylance "HfHubHTTPError" is not exported from module "huggingface_hub.utils" Import from "huggingface_hub.errors" insteadPylancereportPrivateImportUsage --- units/en/unit3_1/creating-the-mcp-server.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/units/en/unit3_1/creating-the-mcp-server.mdx b/units/en/unit3_1/creating-the-mcp-server.mdx index 9ab67e0..d80fe23 100644 --- a/units/en/unit3_1/creating-the-mcp-server.mdx +++ b/units/en/unit3_1/creating-the-mcp-server.mdx @@ -33,7 +33,7 @@ import os import json from fastmcp import FastMCP from huggingface_hub import HfApi, model_info, ModelCard, ModelCardData -from huggingface_hub.utils import HfHubHTTPError +from huggingface_hub.errors import HfHubHTTPError from dotenv import load_dotenv load_dotenv() @@ -333,4 +333,4 @@ In the next section, we'll create the MCP client that will allow our webhook han The MCP server runs as a separate process from your main application. This isolation provides better error handling and allows the server to be reused by multiple clients or applications. - \ No newline at end of file +