Expected [BEGIN], read [?BEGIN]

Help
2013-08-28
2013-08-28
  • I am confused. I am trying to validate an iCalendar feed. The validator is giving me the error "Expected [BEGIN], read [?BEGIN]"

    But there is no question mark in the feed. In fact, below the error it shows:

    1:  BEGIN:VCALENDAR
    2:  VERSION:2.0
    3:  PRODID:-//Google Inc//Google Calendar 70.9054//EN
    4:  CALSCALE:GREGORIAN
    5:  METHOD:PUBLISH
    6:  X-WR-CALNAME:Doe, John - Enrollment Calendar
    7:  X-WR-CALDESC:Doe, John - Enrollment Calendar
    
     
    • Erich Bremer
      Erich Bremer
      2013-08-28

      Please send all e-mail for me to erich.bremer@stonybrook.edu

       
  • I should add that sometimes (randomly), the validator shows the first line as:

    1:  BEGIN:VCALENDAR
    
     
  • Ben Fortuna
    Ben Fortuna
    2013-08-28

    Hi Aaron,

    I suspect there is something corrupting your input stream data. You may want to download the data locally first, then perform some sanity check (i.e. check the stream data starts with 'BEGIN') before trying to parse the data.

    regards,
    ben