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

java.util.UnknownFormatConversionException: Conversion = '.' in GTFS GraphQL API when an invalid combination of street modes is specified #6322

Open
miklcct opened this issue Dec 9, 2024 · 2 comments

Comments

@miklcct
Copy link
Contributor

miklcct commented Dec 9, 2024

NOTE: this issue system is intended for reporting bugs and tracking progress in software
development. For all other usage and software development questions or discussion, please post a
question in our chat room: https://gitter.im/opentripplanner/OpenTripPlanner.

Expected behavior

The error message is descriptive.

Observed behavior

The GraphQL error says java.util.UnknownFormatConversionException: Conversion = '.'

The log says

java.util.UnknownFormatConversionException: Conversion = '.'
        at java.base/java.util.Formatter.parse(Formatter.java:2852)
        at java.base/java.util.Formatter.format(Formatter.java:2774)
        at java.base/java.util.Formatter.format(Formatter.java:2728)
        at java.base/java.lang.String.formatted(String.java:4452)
        at org.opentripplanner.apis.gtfs.mapping.routerequest.ModePreferencesMapper.getStreetMode(ModePreferencesMapper.java:111)
        at org.opentripplanner.apis.gtfs.mapping.routerequest.ModePreferencesMapper.setModes(ModePreferencesMapper.java:35)
        at org.opentripplanner.apis.gtfs.mapping.routerequest.RouteRequestMapper.toR

Version of OTP used (exact commit hash or JAR name)

2.7.0-SNAPSHOT

Data sets in use (links to GTFS and OSM PBF files)

irrelevant

Command line used to start OTP

irrelevant

Router config and graph build config JSON

Just need to enable the GraphQL API

Steps to reproduce the problem

Send a route request containing 3 street modes (which aren't supported) for the access.

For example,

query GtfsExampleQuery {
  planConnection(
    origin: {location: {coordinate: {latitude: 51.5, longitude:0.0}}}
    destination: {location: {coordinate: {latitude: 51.5, longitude: 0.0}}}
    modes: {
      transit: {
        access: [WALK, BICYCLE, CAR]
      }
    }
  ) {
    edges {
      node {
        start
      }
    }
  }
}
@optionsome
Copy link
Member

Can you add an example on how to replicate this?

@miklcct
Copy link
Contributor Author

miklcct commented Dec 12, 2024

Can you add an example on how to replicate this?

added

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

No branches or pull requests

2 participants