[PR #285] [MERGED] [FBref] Handle missing flag icon in Squad or Nation column #431

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

📋 Pull Request Information

Original PR: https://github.com/probberechts/soccerdata/pull/285
Author: @lorenzodb1
Created: 7/7/2023
Status: Merged
Merged: 7/8/2023
Merged by: @probberechts

Base: masterHead: lorenzodb1-indexerror-fix-nation-col


📝 Commits (1)

  • 4f4f803 Fixed IndexError in _fix_nation_col

📊 Changes

1 file changed (+11 additions, -2 deletions)

View changed files

📝 soccerdata/fbref.py (+11 -2)

📄 Description

The method _fix_nation_col throws an IndexError, supposedly when no flag is present. I fixed this by changing the logic to use regular expressions instead so that no error is thrown when the flag is missing.


🔄 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/285 **Author:** [@lorenzodb1](https://github.com/lorenzodb1) **Created:** 7/7/2023 **Status:** ✅ Merged **Merged:** 7/8/2023 **Merged by:** [@probberechts](https://github.com/probberechts) **Base:** `master` ← **Head:** `lorenzodb1-indexerror-fix-nation-col` --- ### 📝 Commits (1) - [`4f4f803`](https://github.com/probberechts/soccerdata/commit/4f4f8035e942634987353d84e0a0aa6dd6ac7bd9) Fixed IndexError in _fix_nation_col ### 📊 Changes **1 file changed** (+11 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `soccerdata/fbref.py` (+11 -2) </details> ### 📄 Description The method _fix_nation_col throws an IndexError, supposedly when no flag is present. I fixed this by changing the logic to use regular expressions instead so that no error is thrown when the flag is missing. --- <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:54 +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#431
No description provided.