Skip to content

Conversation

Mgabr90
Copy link

@Mgabr90 Mgabr90 commented Jun 3, 2025

This commit addresses two critical issues:

  1. Server Startup Fix: Resolves ValueError preventing server from starting

    • Add import os statement
    • Set LOG_LEVEL environment variable to 'INFO' by default
    • Pass explicit log_level='INFO' parameter to FastMCP constructor
    • Fixes: "ValueError: Invalid log level: info. Expected one of: ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']"
  2. Critical Performance Fix: Remove duplicate PDF processing in save_path mode

    • Previously, PDFs were processed twice when using save_path (lines 47 & 51)
    • This caused 2x processing time and unnecessary resource usage for large files
    • Now PDF is processed only once and content reused for file writing

These fixes resolve server startup failures and significantly improve performance for file-saving operations.

This commit addresses two critical issues:

1. **Server Startup Fix**: Resolves ValueError preventing server from starting
   - Add import os statement
   - Set LOG_LEVEL environment variable to 'INFO' by default  
   - Pass explicit log_level='INFO' parameter to FastMCP constructor
   - Fixes: \"ValueError: Invalid log level: info. Expected one of: ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']\"

2. **Critical Performance Fix**: Remove duplicate PDF processing in save_path mode
   - Previously, PDFs were processed twice when using save_path (lines 47 & 51)
   - This caused 2x processing time and unnecessary resource usage for large files
   - Now PDF is processed only once and content reused for file writing

These fixes resolve server startup failures and significantly improve performance for file-saving operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant