Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Dec 28, 2025

Rationale for this change

I noticed we dump the entire error traceback in log warn messages. This causes a wall of text when using the CLI.

This PR moves exception info from warning to debug level, where applicable. This provides cleaner user-facing output by default while still making detailed exception info available for troubleshooting via debug logging.

  • Users now see clean one-line warnings instead of full tracebacks.
  • Developers can enable debug logging to see detailed exception info.

Are these changes tested?

Are there any user-facing changes?

Before

Could not initialize FileIO: pyiceberg.io.pyarrow.PyArrowFileIO
Traceback (most recent call last):
  File "/Users/kevinliu/repos/iceberg-python/pyiceberg/io/__init__.py", line 321, in _import_file_io
    module = importlib.import_module(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kevinliu/.pyenv/versions/3.12.11/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/kevinliu/repos/iceberg-python/pyiceberg/io/pyarrow.py", line 54, in <module>
    import pyarrow as pa
ModuleNotFoundError: No module named 'pyarrow'

After

Could not initialize FileIO: pyiceberg.io.pyarrow.PyArrowFileIO

Move exception info from warning to debug level in import error handlers.
This provides cleaner user-facing output by default while still making
detailed exception info available for troubleshooting via debug logging.

Changes:
- FileIO import failures (pyiceberg.io.__init__)
- LocationProvider import failures (pyiceberg.table.locations)
- Catalog import failures (pyiceberg.catalog.__init__)
- File deletion failures (pyiceberg.catalog.__init__)

Users now see clean one-line warnings instead of full tracebacks.
Developers can enable debug logging to see detailed exception info.
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.