Skip to content

Fix formatting issue in setup.py#97

Open
guptaa3 wants to merge 10 commits into
ets:mainfrom
guptaa3:patch-1
Open

Fix formatting issue in setup.py#97
guptaa3 wants to merge 10 commits into
ets:mainfrom
guptaa3:patch-1

Conversation

@guptaa3

@guptaa3 guptaa3 commented Oct 29, 2025

Copy link
Copy Markdown

Getting error while installig extractor due to missing comma -

#0 201.0 × Getting requirements to build wheel did not run successfully.

  | #0 201.0 │ exit code: 1
  | #0 201.0 ╰─> [5 lines of output]
  | #0 201.0 /tmp/pip-build-env-hi76hxvm/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  | #0 201.0 warnings.warn(msg)
  | #0 201.0 error in tap-spreadsheets-anywhere setup command: 'install_requires' must be a string or iterable of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier)
  | #0 201.0 jsonpath-ng>=1.5.3pyarrow>=5.0.0

@guptaa3

guptaa3 commented Jun 11, 2026

Copy link
Copy Markdown
Author

@ets request your review please

twcurrie and others added 3 commits June 12, 2026 09:31
LOGGER.exception(msg, exc) passes `exc` as a %-style format arg for
`msg`, not as the exception to log. When `exc` contains characters
that look like format specifiers (or simply when `msg` has no `%s`
placeholder), Python raises:

  TypeError: not all arguments converted during string formatting

or similar — crashing the extractor instead of skipping the unparseable
file as intended.

Fix: embed the exception in the f-string message directly so the error
detail is preserved in the log output. LOGGER.exception() already
captures the current exception via exc_info=True by default.

Affected calls:
- write_file(): InvalidFormatError handling (invalid_format_action=ignore)
- sample_file(): InvalidFormatError handling (invalid_format_action=ignore)

Fixes artemis_manager_spreadsheets_anywhere organization-events
pipeline failures caused by empty MDM Delete JSON files dropped to S3.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Tests verify that write_file and sample_file do not crash when an
InvalidFormatError whose str() contains '%' characters is logged with
invalid_format_action='ignore'. A strict StreamHandler is used to
surface the ValueError that the old LOGGER.exception(msg, exc) call
would trigger inside LogRecord.getMessage().

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fix LOGGER.exception calls crashing extractor on unparseable files
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