I’ve been facing in R the error message
Error in new.session() : Could not establish session after 5 attempts. for days using getSymbols of the quantmod package:
getSymbols(tick, from = date_from, to = date_to, warnings = FALSE, auto.assign = TRUE)
The same issue applies to:
getSymbols(tick, from = date_from, to = date_to, warnings = FALSE, auto.assign = TRUE, src="yahoo")
Update QuantMod and try again:
This was a bug that was fixed very swiftly. Thank you Joshua Ulrich!
This was an issue on 2022-04-29 that Joshua Ulrich promptly published a fix for. You could install the patched version with:
But the changes are now into CRAN, so you should just be able to update QuantMod and continue with your day.
GitHub issue here.