Fix formatting issue in setup.py#97
Open
guptaa3 wants to merge 10 commits into
Open
Conversation
Author
|
@ets request your review please |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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