DerekYves / placement

Drivetime, distance, and geocoding in R via the Google Maps API
Other
21 stars 3 forks source link

Build errored with stringi_1.1.7 #6

Open gagolews opened 6 years ago

gagolews commented 6 years ago

Hi!

I'm trying to push a newer stringi version to CRAN. It's available at:

install_github("gagolews/stringi")

Even though the changes between v1.1.6 and v1.1.7 are very cosmetic (mods to the C/C++ code -- removed #pragmas suppressing some warnings and changing the order of the parameters to some class constructor affecting the Windows-only build), I got a response from the CRAN team that your package errored during check:

Package: placement
Check: examples
New result: ERROR
  Running examples in ‘placement-Ex.R’ failed
  The error most likely occurred in:

  > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
  > ### Name: drive_time
  > ### Title: Get travel time and distance between two point using the Google
  > ###   API.
  > ### Aliases: drive_time
  >
  > ### ** Examples
  >
  > # Bike from the NYC to Google!
  > address <- c("350 5th Ave, New York, NY 10118, USA",
  +                      "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA")
  >
  > coordset <- geocode_url(address, auth="standard_api", privkey="",
  +             clean=TRUE, add_date='today', verbose=TRUE)
  Sending address vector (n=2) to Google...
  Finished. 2 of 2 records successfully geocoded.
  >
  > # Save coordinates. Google requires a format of: "lat,lng" (with no spaces)
  > start <- paste(coordset$lat[1],coordset$lng[1], sep=",")
  > end <- paste(coordset$lat[2],coordset$lng[2], sep=",")
  >
  > # Get the travel time by bike (a mere 264 hours!) and distance in miles:
  > howfar_miles <- drive_time(address=start, dest=end, auth="standard_api",
  +                                                privkey="", clean=FALSE, add_date='today',
  +                                                verbose=FALSE, travel_mode="bicycling",
  +                                                units="imperial")
  Error in vapply(json, function(x) { : values must be length 11,
   but FUN(X[[1]]) result is length 0
  Calls: drive_time -> t -> vapply
  Execution halted 

Is the error likely to be on the stringi side?

Cheers!

gagolews commented 6 years ago

Strangely enough, I got notified that some other CRAN team member couldn't replicate these errors on his system..

DerekYves commented 6 years ago

H Marek,

That does not look like a stringi error and may have been caused by someone running the example code while the google server was down? I sadly don’t have a Windows machine to test but my main use for stringi in that package was for string processing. I’ll try to reproduce the error today but it seems like your update should not affect the package. Thanks, derek

On Wed, Mar 14, 2018 at 6:00 AM Marek Gagolewski notifications@github.com wrote:

Strangely enough, I got notified that some other CRAN team member couldn't replicate these errors on his system..

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DerekYves/placement/issues/6#issuecomment-372966012, or mute the thread https://github.com/notifications/unsubscribe-auth/APwNq-jMxWSZl2kLyVHNRvaAEAevRK5Mks5teOo0gaJpZM4Sm5-Z .