Skip to content
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

Error invalid char in json text. #53

Closed
Stephonomon opened this issue Nov 22, 2019 · 3 comments
Closed

Error invalid char in json text. #53

Stephonomon opened this issue Nov 22, 2019 · 3 comments

Comments

@Stephonomon
Copy link

I used the following
osrmIsochrone(c(-95.9345,41.2565), breaks = 10)
and received this error

The OSRM server returned an error:
Error: lexical error: invalid char in json text.
                                       <HTML><HEAD>  <TITLE>Request Er
                     (right here) ------^


The OSRM server returned an error:
Error: lexical error: invalid char in json text.
                                       <HTML><HEAD>  <TITLE>Request Er
                     (right here) ------^


The OSRM server returned an error:
Error: lexical error: invalid char in json text.
                                       <HTML><HEAD>  <TITLE>Request Er
                     (right here) ------^


Error in UseMethod("st_as_sf") : 
  no applicable method for 'st_as_sf' applied to an object of class "NULL"```
@rCarto
Copy link
Member

rCarto commented Nov 27, 2019

Hello,
I see no problem.
Do you use the demo server or your own?

@rCarto rCarto closed this as completed Dec 13, 2019
@Stephonomon
Copy link
Author

Stephonomon commented Dec 17, 2019

I tried using the demo server.

options(osrm.server = "https://router.project-osrm.org/", osrm.profile = "driving")

@rCarto
Copy link
Member

rCarto commented Dec 17, 2019

Hello,
Except from occasional "Too Many Request..." messages the function seems to work:

library(osrm)
#> Data: (c) OpenStreetMap contributors, ODbL 1.0 - http://www.openstreetmap.org/copyright
#> Routing: OSRM - http://project-osrm.org/
library(sp)
x <- osrmIsochrone(loc = c(-95.9345,41.2565), breaks = 10)
#> Linking to GEOS 3.7.1, GDAL 2.4.0, PROJ 5.2.0
plot(x)


Created on 2019-12-17 by the reprex package (v0.3.0)
Beside, I use options(osrm.server = "http://router.project-osrm.org/", osrm.profile = "driving"), http instead of https

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants