Skip to content

[sheets-] on reload, fetch fresh data for URLs #2835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2025

Conversation

midichef
Copy link
Contributor

@midichef midichef commented Aug 6, 2025

Closes #2825.

The problem was that for URLs, the initial content of the URL is saved in in sheet.source (a visidata.Path object) inside a RepeatFile. Reloading the sheet merely reread the saved contents.

sheet.source.is_url() and sheet.source.scheme != 'file': #2825
#retrieve data again, because the earlier data saved in sheet.source may be outdated
vs = vd.openSource(Path(sheet.source.given))
if type(vs) != type(sheet): #new data may have a different filetype
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a more Pythonic way to do this. is or isinstance? But I'm not sure, and I don't think it's a big deal.

@anjakefala anjakefala merged commit d5c5351 into saulpw:develop Aug 11, 2025
14 checks passed
@midichef midichef deleted the http_reload branch August 11, 2025 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data loaded from http is not refreshed by Ctrl-R
3 participants