JaseZiv / worldfootballR

A wrapper for extracting world football (soccer) data from FBref, Transfermark, Understat
https://jaseziv.github.io/worldfootballR/
444 stars 60 forks source link

Error in open.connection(x, "rb") : SSL certificate problem: certificate has expired #144

Closed prowe8 closed 2 years ago

prowe8 commented 2 years ago

Hi all, trying to create pizza plots using ggshakeR and getting this error message consistently: Error in open.connection(x, "rb") : SSL certificate problem: certificate has expired

Full code + error message is here: > single_player <- fb_player_scouting_report("https://fbref.com/en/players/f586779e/Tammy-Abraham", pos_versus = "primary") Error in open.connection(x, "rb") : SSL certificate problem: certificate has expired

pizza <- plot_pizza(data = single_player, type = "single", template = "forward",

  • color_possession = "#41ab5d", color_attack = "#fec44f", color_defense = "#de2d26",
  • season = "Last 365 Days", theme = "dark") Error in filter(., scouting_period == season) : object 'single_player' not found

pizza Error: object 'pizza' not found

Really not sure how to solve it as my OS is up to date as well - any help would be appreciated! Don't think I'm blocked from Fbref as can still use the website etc

tonyelhabr commented 2 years ago

Possibly relevant: https://github.com/JaseZiv/worldfootballR/issues/138#issuecomment-1162835376. Updating your OS was a good first step. I would have expected that to resolve the issue. Thus, I have to conclude that it's a temporary block.

tonyelhabr commented 2 years ago

Can't replicate the issue.

fb_player_scouting_report("https://fbref.com/en/players/f586779e/Tammy-Abraham", pos_versus = "primary")
               Player   Versus StatGroup               Statistic Per90 Percentile BasedOnMinutes scouting_period
2...1   Tammy Abraham Forwards  Standard                   Goals  0.50         73           3084   Last 365 Days
3...2   Tammy Abraham Forwards  Standard                 Assists  0.12         51           3084   Last 365 Days
4...3   Tammy Abraham Forwards  Standard       Non-Penalty Goals  0.41         70           3084   Last 365 Days
5...4   Tammy Abraham Forwards  Standard      Penalty Kicks Made  0.09         67           3084   Last 365 Days
6...5   Tammy Abraham Forwards  Standard Penalty Kicks Attempted  0.09         60           3084   Last 365 Days
7...6   Tammy Abraham Forwards  Standard            Yellow Cards  0.26         15           3084   Last 365 Days
8...7   Tammy Abraham Forwards  Standard               Red Cards  0.00         55           3084   Last 365 Days
10...8  Tammy Abraham Forwards  Standard                      xG  0.60         92           3084   Last 365 Days
11...9  Tammy Abraham Forwards  Standard                    npxG  0.53         92           3084   Last 365 Days
12...10 Tammy Abraham Forwards  Standard                      xA  0.11         46           3084   Last 365 Days
13...11 Tammy Abraham Forwards  Standard                 npxG+xA  0.64         88           3084   Last 365 Days
16...12 Tammy Abraham Forwards  Shooting                   Goals  0.50         73           3084   Last 365 Days
 [ reached 'max' / getOption("max.print") -- omitted 733 rows ]
prowe8 commented 2 years ago

Okay thank you for the reply! Do you know how long blocks last and if it would continue on another device at all? Thanks!

tonyelhabr commented 2 years ago

Okay thank you for the reply! Do you know how long blocks last and if it would continue on another device at all? Thanks!

sports-reference mentioned that the block is 12 hours. I think it's probably done by external IP address, meaning you would face the same issue on a different device, assuming you're using the same network. But you can give it a shot and see what happens.

JaseZiv commented 2 years ago

Can confirm the SSL certificate problem is rectified upgrading the OS. Will close this issue for now.