Skip to content

Commit

Permalink
Add user agent to Pooch HTTP downloader to fix RTD-GH download error
Browse files Browse the repository at this point in the history
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
  • Loading branch information
hakonanes committed Nov 19, 2024
1 parent 76dc0f0 commit 96fb621
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/kikuchipy/data/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,9 @@ def fetch_file_path(
) -> str:
if show_progressbar is None:
show_progressbar = hs.preferences.General.show_progressbar
downloader = pooch.HTTPDownloader(progressbar=show_progressbar)
downloader = pooch.HTTPDownloader(
progressbar=show_progressbar, headers={"User-Agent": "agent"}
)

if self.is_in_package:
if self.has_correct_hash:
Expand Down

0 comments on commit 96fb621

Please sign in to comment.