[PR #303] [MERGED] [FBref] Informative errors when merge fails #447

Closed
opened 2026-03-02 15:57:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/probberechts/soccerdata/pull/303
Author: @probberechts
Created: 7/22/2023
Status: Merged
Merged: 7/23/2023
Merged by: @probberechts

Base: masterHead: feat-fbref-concat-errors


📝 Commits (2)

  • 7affe0f [FBref] Informative errors when merge fails
  • 22ef264 fix bugs

📊 Changes

2 files changed (+84 additions, -27 deletions)

View changed files

📝 soccerdata/fbref.py (+78 -21)
📝 tests/test_FBref.py (+6 -6)

📄 Description

The FBref scraper attempts to merge data from multiple games, seasons, etc. in a single DataFrame. Sometimes this automatic merge fails, in which case a cryptic error is thrown. Now, a more informative error message is printed listing the additional and/or missing columns and with the suggestion to clear the cache (a common cause is merging new with outdated cached data).

Fixes #161


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/probberechts/soccerdata/pull/303 **Author:** [@probberechts](https://github.com/probberechts) **Created:** 7/22/2023 **Status:** ✅ Merged **Merged:** 7/23/2023 **Merged by:** [@probberechts](https://github.com/probberechts) **Base:** `master` ← **Head:** `feat-fbref-concat-errors` --- ### 📝 Commits (2) - [`7affe0f`](https://github.com/probberechts/soccerdata/commit/7affe0feeb6a5d08ebc32bd2d6db8712ee95b777) [FBref] Informative errors when merge fails - [`22ef264`](https://github.com/probberechts/soccerdata/commit/22ef2649afe5f7275fca40d3cd547d0038084c23) fix bugs ### 📊 Changes **2 files changed** (+84 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `soccerdata/fbref.py` (+78 -21) 📝 `tests/test_FBref.py` (+6 -6) </details> ### 📄 Description The FBref scraper attempts to merge data from multiple games, seasons, etc. in a single DataFrame. Sometimes this automatic merge fails, in which case a cryptic error is thrown. Now, a more informative error message is printed listing the additional and/or missing columns and with the suggestion to clear the cache (a common cause is merging new with outdated cached data). Fixes #161 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 15:57:59 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#447
No description provided.