I’m trying to use a package AutoEnvs which uses the AutomotiveDrivingModels package but when I run using AutoEnvs I get this error
MethodError: no method matching parse(::Type{AutomotiveDrivingModels.LaneConnection}, ::SubString{String})
But in the same file where this call to parse() is made it defines the overloaded parse() with precisely these parameters. In the problem code in AutomotiveDrivingModels/src/2d/roadway/roadways.jl they do all of the following:
- Define
struct LaneConnection - Define
function Base.parse(::Type{LaneConnection}, line::String) - Define
function advance!() - In a loop set
conn = parse(LaneConnection, advance!())- this throws the error
I tried using ::Type{AutomotiveDrivingModels.LaneConnection} in the definition of Base.parse and also adding the package name in the call to parse but it didn’t help.
Based on the error it looks like advance!() is returning a SubString - could this be the problem if the overloaded parse() is expecting String ?
I also tried adding import Base: parse as recommended here but it didn’t help.
This is all to try and install ngsim_env. Note, the installation instructions require an older version of AutomotiveDrivingModels at a specific commit.
I am on Mac OS Mojave 10.14 and also using Julia v0.7.0 because of a restriction in ngsim_env.
Thank you for any help!