fix: String to int conversion in scraping#474
Merged
edgarrmondragon merged 5 commits intoMeltanoLabs:mainfrom Oct 14, 2025
Merged
fix: String to int conversion in scraping#474edgarrmondragon merged 5 commits intoMeltanoLabs:mainfrom
edgarrmondragon merged 5 commits intoMeltanoLabs:mainfrom
Conversation
Fix for:
```
2025-10-13T12:47:24.737839Z [info] An unhandled error occurred while syncing 'dependents'
2025-10-13T12:47:24.738171Z [info] An unhandled error occurred while syncing 'repositories'
2025-10-13T12:47:24.743866Z [info] invalid literal for int() with base 10: '1,808'
2025-10-13T12:47:24.743946Z [info] Traceback (most recent call last):
2025-10-13T12:47:24.744036Z [info] File "tap-github", line 12, in <module>
2025-10-13T12:47:24.744184Z [info] sys.exit(cli())
2025-10-13T12:47:24.744372Z [info] File "site-packages/click/core.py", line 1462, in __call__
2025-10-13T12:47:24.744444Z [info] return self.main(*args, **kwargs)
2025-10-13T12:47:24.744582Z [info] File "site-packages/click/core.py", line 1383, in main
2025-10-13T12:47:24.744647Z [info] rv = self.invoke(ctx)
2025-10-13T12:47:24.744781Z [info] File "site-packages/singer_sdk/plugin_base.py", line 150, in invoke
2025-10-13T12:47:24.744844Z [info] return super().invoke(ctx)
2025-10-13T12:47:24.744969Z [info] File "site-packages/click/core.py", line 1246, in invoke
2025-10-13T12:47:24.745031Z [info] return ctx.invoke(self.callback, **ctx.params)
2025-10-13T12:47:24.745153Z [info] File "site-packages/click/core.py", line 814, in invoke
2025-10-13T12:47:24.745214Z [info] return callback(*args, **kwargs)
2025-10-13T12:47:24.745335Z [info] File "site-packages/singer_sdk/tap_base.py", line 554, in invoke
2025-10-13T12:47:24.745396Z [info] tap.sync_all()
2025-10-13T12:47:24.745456Z [info] File "site-packages/singer_sdk/tap_base.py", line 495, in sync_all
2025-10-13T12:47:24.745517Z [info] stream.sync()
2025-10-13T12:47:24.745577Z [info] File "site-packages/singer_sdk/streams/core.py", line 1354, in sync
2025-10-13T12:47:24.745638Z [info] for _ in self._sync_records(context=context):
2025-10-13T12:47:24.745757Z [info] File "site-packages/singer_sdk/streams/core.py", line 1251, in _sync_records
2025-10-13T12:47:24.745819Z [info] self._process_record(
2025-10-13T12:47:24.745881Z [info] File "site-packages/singer_sdk/streams/core.py", line 1180, in _process_record
2025-10-13T12:47:24.745941Z [info] self._sync_children(copy.copy(context))
2025-10-13T12:47:24.746001Z [info] File "site-packages/singer_sdk/streams/core.py", line 1376, in _sync_children
2025-10-13T12:47:24.746061Z [info] child_stream.sync(context=child_context)
2025-10-13T12:47:24.746120Z [info] File "site-packages/singer_sdk/streams/core.py", line 1354, in sync
2025-10-13T12:47:24.746180Z [info] for _ in self._sync_records(context=context):
2025-10-13T12:47:24.746299Z [info] File "site-packages/singer_sdk/streams/core.py", line 1229, in _sync_records
2025-10-13T12:47:24.746360Z [info] for idx, record_result in enumerate(self.get_records(current_context)):
2025-10-13T12:47:24.746480Z [info] File "site-packages/singer_sdk/streams/rest.py", line 631, in get_records
2025-10-13T12:47:24.746540Z [info] yield from self.request_records(context)
2025-10-13T12:47:24.746600Z [info] File "site-packages/singer_sdk/streams/rest.py", line 466, in request_records
2025-10-13T12:47:24.746659Z [info] first_record = next(records)
2025-10-13T12:47:24.746781Z [info] File "site-packages/tap_github/repository_streams.py", line 3189, in parse_response
2025-10-13T12:47:24.746842Z [info] yield from scrape_dependents(response, self.logger)
2025-10-13T12:47:24.746900Z [info] File "site-packages/tap_github/scraping.py", line 42, in scrape_dependents
2025-10-13T12:47:24.746960Z [info] yield from _scrape_dependents(f"https://{base_url}/{link}", logger)
2025-10-13T12:47:24.747019Z [info] File "site-packages/tap_github/scraping.py", line 61, in _scrape_dependents
2025-10-13T12:47:24.747079Z [info] int(s.next_sibling.strip())
2025-10-13T12:47:24.747140Z [info] ValueError: invalid literal for int() with base 10: '1,808'
```
|
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.



Hey, I'm not familiar with the codebase at all but had this error, so creating pr.
if someone could take it it will be great!
Fix for: