Skip to content

Conversation

@tariknz
Copy link
Owner

@tariknz tariknz commented Jun 1, 2025

Encountered a bug where a user had a strange name that broke the yaml parser

There was an error getting session data: YAMLException: bad indentation of a mapping entry (1500:17)

 1497 |    TeamIncidentCount: -1
 1498 |  - CarIdx: 11
 1499 |    UserName:
 1500 |    AbbrevName:  ,
------------------------^
 1501 |    Initials:
 1502 |    UserID: 1195427
    at generateError (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:905:10)
    at throwError (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:908:9)
    at readBlockMapping (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:1576:7)
    at composeNode (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:1751:78)
    at readBlockSequence (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:1464:5)
    at composeNode (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:1772:45)
    at readBlockMapping (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:1561:11)
    at composeNode (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:1751:78)
    at readBlockMapping (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:1561:11)
    at composeNode (C:\Users\tarik\projects\irdashies\.vite\build\irsdk-node-CLcQWili.js:1751:78) {
  reason: 'bad indentation of a mapping entry',
  mark: {
    name: null,
    buffer: '---\n' +
      'WeekendInfo:\n' +
      ' TrackName: navarra speedlong\n' +
      ' TrackID: 515\n' +
      ' TrackLength: 3.89 km\n' +
      ' TrackLengthOfficial: 3.93 km\n' +
      ' TrackDisplayName: Circuito de Navarra\n' +
      ' TrackDisplayShortName: Navarra\n' +
      ' TrackConfigName: Speed Circuit Long\n' +
      ' TrackCity: Los Arcos\n' +
      ' TrackState: Navarre\n' +
      ' TrackCountry: Spain\n' +
      ' TrackAltitude: 421.00 m\n' +
      ' TrackLatitude: 42.559233 m\n' +
      ' TrackLongitude: -2.168089 m\n' +
      ' TrackNorthOffset: 2.7562 rad\n' +
      ' TrackNumTurns: 15\n' +
      ' TrackPitSpeedLimit: 60.00 kph\n' +
      ' TrackPaceSpeed: 22.35 kph\n' +
      ' TrackNumPitStalls: 16\n' +
      ' TrackType: road course\n' +
      ' TrackDirection: neutral\n' +
      ' TrackWeatherType: Realistic\n' +
      ' TrackSkies: Dynamic\n' +
      ' TrackSurfaceTemp: 22.73 C\n' +
      ' TrackSurfaceTempCrew: 31.67 C\n' +
      ' TrackAirTemp: 19.73 C\n' +
      ' TrackAirPressure: 28.55 Hg\n' +
      ' TrackAirDensity: 1.14 kg/m^3\n' +
      ' TrackWindVel: 6.05 m/s\n' +
      ' TrackWindDir: 5.29 rad\n' +
      ' TrackRelativeHumidity: 78 %\n' +
      ' TrackFogLevel: 0 %\n' +
      ' TrackPrecipitation: 0 %\n' +
      ' TrackCleanup: 1\n' +
      ' TrackDynamicTrack: 1\n' +
      ' TrackVersion: 2025.03.06.01\n' +
      ' SeriesID: 571\n' +
      ' SeasonID: 5390\n' +
      ' SessionID: 276227629\n' +
      ' SubSessionID: 77384401\n' +
      ' LeagueID: 0\n' +
      ' Official: 1\n' +
      ' RaceWeek: 10\n' +
      ' EventType: Race\n' +
      ' Category: SportsCar\n' +
      ' SimMode: full\n' +
      ' TeamRacing: 0\n' +
      ' MinDrivers: 0\n' +
      ' MaxDrivers: 1\n' +
      ' DCRuleSet: None\n' +
      ' QualifierMustStartRace: 0\n' +
      ' NumCarClasses: 1\n' +
      ' NumCarTypes: 2\n' +
      ' HeatRacing: 0\n' +
      ' BuildType: Release\n' +
      ' BuildTarget: Members\n' +
      ' BuildVersion: 2025.05.06.01\n' +
      ' RaceFarm: US-West\n' +
      ' WeekendOptions:\n' +
      '  NumStarters: 12\n' +
      '  StartingGrid: 2x2 inline pole on left\n' +
      '  QualifyScoring: best lap\n' +
      '  CourseCautions: advisory\n' +
      '  StandingStart: 1\n' +
      '  ShortParadeLap: 0\n' +
      '  Restarts: double file lapped cars behind\n' +
      '  WeatherType: Realistic\n' +
      '  Skies: Dynamic\n' +
      '  WindDirection: N\n' +
      '  WindSpeed: 3.22 km/h\n' +
      '  WeatherTemp: 25.56 C\n' +
      '  RelativeHumidity: 45 %\n' +
      '  FogLevel: 0 %\n' +
      '  TimeOfDay: 4:05 pm\n' +
      '  Date: 2025-05-31\n' +
      '  EarthRotationSpeedupFactor: 1\n' +
      '  Unofficial: 0\n' +
      '  CommercialMode: consumer\n' +
      '  NightMode: variable\n' +
      '  IsFixedSetup: 1\n' +
      '  StrictLapsChecking: default\n' +
      '  HasOpenRegistration: 0\n' +
      '  HardcoreLevel: 1\n' +
      '  NumJokerLaps: 0\n' +
      '  IncidentLimit: 17\n' +
      '  FastRepairsLimit: 1\n' +
      '  GreenWhiteCheckeredLimit: 0\n' +
      ' TelemetryOptions:\n' +
      '  TelemetryDiskFile: ""\n' +
      '\n' +
      'SessionInfo:\n' +
      ' CurrentSessionNum: 2\n' +
      ' Sessions:\n' +
      ' - SessionNum: 0\n' +
      '   SessionLaps: unlimited\n' +
      '   SessionTime: 180.0000 sec\n' +
      '   SessionNumLapsToAvg: 0\n' +
      '   SessionType: Practice\n' +
      '   SessionTrackRubberState: moderately high usage\n' +
      '   SessionName: PRACTICE\n' +
      '   SessionSubType: \n' +
      '   SessionSkipped: 0\n' +
      '   SessionRunGroupsUsed: 0\n' +
      '   SessionEnforceTireCompoundChange: 0\n' +
      '   ResultsPositions:\n' +
      '   - Position: 1\n' +
      '     ClassPosition: 0\n' +
      '     CarIdx: 1\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.000\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 2\n' +
      '     ClassPosition: 1\n' +
      '     CarIdx: 2\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.000\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 3\n' +
      '     ClassPosition: 2\n' +
      '     CarIdx: 3\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 1\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 1.187\n' +
      '     Incidents: 2\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 4\n' +
      '     ClassPosition: 3\n' +
      '     CarIdx: 4\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 1\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 1.094\n' +
      '     Incidents: 2\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 5\n' +
      '     ClassPosition: 4\n' +
      '     CarIdx: 5\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.632\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 6\n' +
      '     ClassPosition: 5\n' +
      '     CarIdx: 6\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.000\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 7\n' +
      '     ClassPosition: 6\n' +
      '     CarIdx: 7\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.937\n' +
      '     Incidents: 4\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 8\n' +
      '     ClassPosition: 7\n' +
      '     CarIdx: 8\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.000\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 9\n' +
      '     ClassPosition: 8\n' +
      '     CarIdx: 9\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.771\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 10\n' +
      '     ClassPosition: 9\n' +
      '     CarIdx: 10\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.000\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 11\n' +
      '     ClassPosition: 10\n' +
      '     CarIdx: 11\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.830\n' +
      '     Incidents: 1\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   ResultsFastestLap:\n' +
      '   - CarIdx: 255\n' +
      '     FastestLap: 0\n' +
      '     FastestTime: -1.0000\n' +
      '   ResultsAverageLapTime: -1.0000\n' +
      '   ResultsNumCautionFlags: 0\n' +
      '   ResultsNumCautionLaps: 0\n' +
      '   ResultsNumLeadChanges: 0\n' +
      '   ResultsLapsComplete: -1\n' +
      '   ResultsOfficial: 1\n' +
      ' - SessionNum: 1\n' +
      '   SessionLaps: 2\n' +
      '   SessionTime: 480.0000 sec\n' +
      '   SessionNumLapsToAvg: 0\n' +
      '   SessionType: Lone Qualify\n' +
      '   SessionTrackRubberState: carry over\n' +
      '   SessionName: QUALIFY\n' +
      '   SessionSubType: \n' +
      '   SessionSkipped: 0\n' +
      '   SessionRunGroupsUsed: 0\n' +
      '   SessionEnforceTireCompoundChange: 0\n' +
      '   ResultsPositions:\n' +
      '   - Position: 1\n' +
      '     ClassPosition: 0\n' +
      '     CarIdx: 3\n' +
      '     Lap: 2\n' +
      '     Time: 111.2549\n' +
      '     FastestLap: 2\n' +
      '     FastestTime: 111.2549\n' +
      '     LastTime: 111.2549\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.453\n' +
      '     Incidents: 2\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 2\n' +
      '     ClassPosition: 1\n' +
      '     CarIdx: 4\n' +
      '     Lap: 2\n' +
      '     Time: 111.5164\n' +
      '     FastestLap: 2\n' +
      '     FastestTime: 111.5164\n' +
      '     LastTime: 111.5164\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.039\n' +
      '     Incidents: 2\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 3\n' +
      '     ClassPosition: 2\n' +
      '     CarIdx: 7\n' +
      '     Lap: 1\n' +
      '     Time: 112.2194\n' +
      '     FastestLap: 1\n' +
      '     FastestTime: 112.2194\n' +
      '     LastTime: 112.8864\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.871\n' +
      '     Incidents: 4\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 4\n' +
      '     ClassPosition: 3\n' +
      '     CarIdx: 9\n' +
      '     Lap: 2\n' +
      '     Time: 112.5764\n' +
      '     FastestLap: 2\n' +
      '     FastestTime: 112.5764\n' +
      '     LastTime: 112.5764\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.120\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 5\n' +
      '     ClassPosition: 4\n' +
      '     CarIdx: 6\n' +
      '     Lap: 1\n' +
      '     Time: 112.6504\n' +
      '     FastestLap: 1\n' +
      '     FastestTime: 112.6504\n' +
      '     LastTime: 112.7097\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.061\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 6\n' +
      '     ClassPosition: 5\n' +
      '     CarIdx: 2\n' +
      '     Lap: 1\n' +
      '     Time: 112.9565\n' +
      '     FastestLap: 1\n' +
      '     FastestTime: 112.9565\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.036\n' +
      '     Incidents: 1\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 7\n' +
      '     ClassPosition: 6\n' +
      '     CarIdx: 5\n' +
      '     Lap: 2\n' +
      '     Time: 113.5312\n' +
      '     FastestLap: 2\n' +
      '     FastestTime: 113.5312\n' +
      '     LastTime: 113.5312\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.017\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 8\n' +
      '     ClassPosition: 7\n' +
      '     CarIdx: 10\n' +
      '     Lap: 2\n' +
      '     Time: 113.9094\n' +
      '     FastestLap: 2\n' +
      '     FastestTime: 113.9094\n' +
      '     LastTime: 113.9094\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.046\n' +
      '     Incidents: 1\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 9\n' +
      '     ClassPosition: 8\n' +
      '     CarIdx: 11\n' +
      '     Lap: 1\n' +
      '     Time: 114.1907\n' +
      '     FastestLap: 1\n' +
      '     FastestTime: 114.1907\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.006\n' +
      '     Incidents: 5\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 10\n' +
      '     ClassPosition: 9\n' +
      '     CarIdx: 8\n' +
      '     Lap: 2\n' +
      '     Time: 114.2709\n' +
      '     FastestLap: 2\n' +
      '     FastestTime: 114.2709\n' +
      '     LastTime: 114.2709\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 2\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 3.082\n' +
      '     Incidents: 1\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   - Position: 11\n' +
      '     ClassPosition: 10\n' +
      '     CarIdx: 1\n' +
      '     Lap: 0\n' +
      '     Time: -1.0000\n' +
      '     FastestLap: -1\n' +
      '     FastestTime: -1.0000\n' +
      '     LastTime: -1.0000\n' +
      '     LapsLed: 0\n' +
      '     LapsComplete: 0\n' +
      '     JokerLapsComplete: 0\n' +
      '     LapsDriven: 0.000\n' +
      '     Incidents: 0\n' +
      '     ReasonOutId: 0\n' +
      '     ReasonOutStr: Running\n' +
      '   ResultsFastestLap:\n' +
      '   - CarIdx: 3\n' +
      '     FastestLap: 2\n' +
      '     FastestTime: 111.2549\n' +
      '   ResultsAverageLapTime: -1.0000\n' +
      '   ResultsNumCautionFlags: 0\n' +
      '   ResultsNumCautionLaps: 0\n' +
      '   ResultsNumLeadChanges: 0\n' +
      '   ResultsLapsComplete: -1\n' +
      '   ResultsOfficial: 1\n' +
      ' - SessionNum: 2\n' +
      '   SessionLaps:'... 26141 more characters,
    position: 33336,
    line: 1499,
    column: 16,
    snippet: ' 1497 |    TeamIncidentCount: -1\n' +
      ' 1498 |  - CarIdx: 11\n' +
      ' 1499 |    UserName:     \n' +
      ' 1500 |    AbbrevName:  ,  \n' +
      '------------------------^\n' +
      ' 1501 |    Initials:   \n' +
      ' 1502 |    UserID: 1195427'
  }
}

@tariknz tariknz merged commit f78ee77 into main Jun 1, 2025
1 check passed
@tariknz tariknz deleted the fix/yaml-parsing branch June 1, 2025 04:54
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

Successfully merging this pull request may close these issues.

2 participants