PyXLL The Python Excel Add-In
  • Product
    • Features
    • Get Started
    • Request Demo
    • Download
  • Pricing
  • Resources
    • Documentation
    • Blog
    • Videos
    • FAQ
    • Learn Python
    • Customer Portal
    • About Us
  • Support
    • Documentation
    • Videos
    • FAQ
    • Contact Us
  • Contact Us
Table of Contents
  • PyXLL Documentation
  • Introduction to PyXLL
  • User Guide
    • Installing PyXLL
    • Configuring PyXLL
      • Python Settings
      • PyXLL Settings
      • License Key
      • Logging
      • Warnings
      • Configuration Variables
      • Environment Variables
      • Startup Script
      • Menu Ordering
      • Shortcuts
      • Default Decorator Parameters
    • Worksheet Functions
    • Macro Functions
    • Real Time Data
    • Cell Formatting
    • Charts and Plotting
    • Custom Task Panes
    • ActiveX Controls
    • Using Pandas in Excel
    • Customizing the Ribbon
    • Context Menu Functions
    • Working with Tables
    • Python as a VBA Replacement
    • Menu Functions
    • Reloading and Rebinding
    • Error Handling
    • Deploying your add-in
    • Workbook Metadata
  • Video Guides and Tutorials
  • API Reference
  • What’s new in PyXLL 5
  • Changelog
Close

Warnings¶

The Python warnings package is part of the Python standard library and used to alert the user of a problem.

Typically these warnings are logged to the log file, but the warnings module can be configured to elevate these warnings to exceptions or to ignore them completely.

For full details of the warnings package please see the Python documentation here `https://docs.python.org/3/library/warnings.html`_.

The warnings package can be configured in the [LOG] section of the PyXLL config file with the following options.

  • capture_warnings

    Write warnings to the log file.

    If this is set to 0 then warnings will not be captured and written to the log file.

    Defaults to 1.

  • warnings_filters

    Warnings filters to control whether warnings are ignored, dispayed, or turned into errors.

    Multiple warning filters can be configured on multiple lines.

    Individual warnings filters are specified as a sequence of fields separated by colons:

    action:message:category:module:line
    

    Example:

    [LOG]
    warnings_filters =
        default::DeprecationWarning:__main__
        ignore::DeprecationWarning
        ignore::PendingDeprecationWarning
        ignore::ImportWarning
        ignore::ResourceWarning
    
« Logging
Configuration Variables »
  • Home
  • Product
  • Features
  • Documentation
  • Download
  • Pricing
  • Support
  • Documentation
  • Videos
  • FAQ
  • Learn Python
  • Contact Us
  • About
  • About Us
  • Legal
  • Blog
© Copyright PyXLL Ltd