Gitte Wange
2005-Nov-23 17:56 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
Hello, I have a problem parsing an ical file created by the Ical app in MacOSX. I have a very small script created just for test purpose looking like this: begin require ''rubygems'' require_gem ''icalendar'', ">= 0.96" rescue LoadError require ''icalendar'' end require "date" calfile = File.open("Gitte.ics") calparser = Icalendar::Parser.new(calfile) cals = calparser.parse cal = cals.first Running it produces the following traceback: /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/component.rb:305:in `method_missing'': NoMethodError (NoMethodError) from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:221:in `send'' from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:221:in `parse_component'' from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:169:in `parse_component'' from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:141:in `parse'' from icaltest.rb:11 Now I have added some print statements in order to see what goes wrong. The last field inspected looks like this: Name is LAST-MODIFIED value is 20050814T220229Z Params is Any hints? It''s the latest version of icalendar I use. Greetings, Gitte Wange
Jeff Rose
2005-Nov-29 18:32 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
Hi Gitte, Thanks for bringing this up. I had incorrectly specified the property name in the definitions of some of the calendar components. I think I''ve fixed the problem, and I''m packaging things up right now. You should be able to do a gem update within a couple hours. Please let me know how it works, and if you have any questions about the library feel free to post to the list. -Jeff On Wed, 2005-11-23 at 18:56 +0100, Gitte Wange wrote:> Hello, > > I have a problem parsing an ical file created by the Ical app in MacOSX. > I have a very small script created just for test purpose looking like this: > begin > require ''rubygems'' > require_gem ''icalendar'', ">= 0.96" > rescue LoadError > require ''icalendar'' > end > require "date" > > calfile = File.open("Gitte.ics") > calparser = Icalendar::Parser.new(calfile) > cals = calparser.parse > cal = cals.first > > Running it produces the following traceback: > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/component.rb:305:in > `method_missing'': NoMethodError (NoMethodError) > from > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:221:in > `send'' > from > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:221:in > `parse_component'' > from > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:169:in > `parse_component'' > from > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:141:in > `parse'' > from icaltest.rb:11 > > Now I have added some print statements in order to see what goes wrong. > The last field inspected looks like this: > Name is LAST-MODIFIED > value is 20050814T220229Z > Params is > > Any hints? > It''s the latest version of icalendar I use. > > Greetings, > Gitte Wange > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel
Jeff Rose
2005-Nov-29 19:10 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
I also forgot to mention that in the api when you are accessing properties like "LAST-MODIFIED" the accessors use an underscore because dash causes a parse error in ruby. So, you would do: alfile = File.open("Gitte.ics") calparser = Icalendar::Parser.new(calfile) cals = calparser.parse cal = cals.first my_date_time = cal.last_modified -Jeff On Tue, 2005-11-29 at 19:32 +0100, Jeff Rose wrote:> Hi Gitte, > Thanks for bringing this up. I had incorrectly specified the property > name in the definitions of some of the calendar components. I think > I''ve fixed the problem, and I''m packaging things up right now. You > should be able to do a gem update within a couple hours. Please let me > know how it works, and if you have any questions about the library feel > free to post to the list. > > -Jeff > > On Wed, 2005-11-23 at 18:56 +0100, Gitte Wange wrote: > > Hello, > > > > I have a problem parsing an ical file created by the Ical app in MacOSX. > > I have a very small script created just for test purpose looking like this: > > begin > > require ''rubygems'' > > require_gem ''icalendar'', ">= 0.96" > > rescue LoadError > > require ''icalendar'' > > end > > require "date" > > > > calfile = File.open("Gitte.ics") > > calparser = Icalendar::Parser.new(calfile) > > cals = calparser.parse > > cal = cals.first > > > > Running it produces the following traceback: > > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/component.rb:305:in > > `method_missing'': NoMethodError (NoMethodError) > > from > > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:221:in > > `send'' > > from > > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:221:in > > `parse_component'' > > from > > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:169:in > > `parse_component'' > > from > > /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:141:in > > `parse'' > > from icaltest.rb:11 > > > > Now I have added some print statements in order to see what goes wrong. > > The last field inspected looks like this: > > Name is LAST-MODIFIED > > value is 20050814T220229Z > > Params is > > > > Any hints? > > It''s the latest version of icalendar I use. > > > > Greetings, > > Gitte Wange > > _______________________________________________ > > icalendar-devel mailing list > > icalendar-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/icalendar-devel > > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel
Gitte Wange
2005-Nov-29 23:29 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
Jeff Rose wrote:> Hi Gitte, > Thanks for bringing this up. I had incorrectly specified the property > name in the definitions of some of the calendar components. I think > I''ve fixed the problem, and I''m packaging things up right now. You > should be able to do a gem update within a couple hours. Please let me > know how it works, and if you have any questions about the library feel > free to post to the list. > > -JeffI''m very very sorry to inform you that I still get the same error :-( I have not changed anything in my script, just updated the gem. I can see it''s using the new gem from the traceback: gitte at barcrawl ~]$ ruby icaltest.rb /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.3/lib/icalendar/component.rb:305:in `method_missing'': NoMethodError (NoMethodError) from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.3/lib/icalendar/parser.rb:211:in `send'' from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.3/lib/icalendar/parser.rb:211:in `parse_component'' from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.3/lib/icalendar/parser.rb:172:in `parse_component'' from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.3/lib/icalendar/parser.rb:168:in `parse_component'' from /usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.3/lib/icalendar/parser.rb:141:in `parse'' from icaltest.rb:11 It''s so weird ... Greetings, Gitte Wange> > On Wed, 2005-11-23 at 18:56 +0100, Gitte Wange wrote: > >>Hello, >> >>I have a problem parsing an ical file created by the Ical app in MacOSX. >>I have a very small script created just for test purpose looking like this: >>begin >> require ''rubygems'' >> require_gem ''icalendar'', ">= 0.96" >>rescue LoadError >> require ''icalendar'' >>end >>require "date" >> >>calfile = File.open("Gitte.ics") >>calparser = Icalendar::Parser.new(calfile) >>cals = calparser.parse >>cal = cals.first >> >>Running it produces the following traceback: >>/usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/component.rb:305:in >>`method_missing'': NoMethodError (NoMethodError) >> from >>/usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:221:in >>`send'' >> from >>/usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:221:in >>`parse_component'' >> from >>/usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:169:in >>`parse_component'' >> from >>/usr/local/lib/ruby/gems/1.8/gems/icalendar-0.96.2/lib/icalendar/parser.rb:141:in >>`parse'' >> from icaltest.rb:11 >> >>Now I have added some print statements in order to see what goes wrong. >>The last field inspected looks like this: >>Name is LAST-MODIFIED >>value is 20050814T220229Z >>Params is >> >>Any hints? >>It''s the latest version of icalendar I use. >> >>Greetings, >>Gitte Wange >>_______________________________________________ >>icalendar-devel mailing list >>icalendar-devel at rubyforge.org >>http://rubyforge.org/mailman/listinfo/icalendar-devel > > > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel
Gitte Wange
2005-Nov-29 23:33 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
Gitte Wange wrote:> Jeff Rose wrote: > >>Hi Gitte, >> Thanks for bringing this up. I had incorrectly specified the property >>name in the definitions of some of the calendar components. I think >>I''ve fixed the problem, and I''m packaging things up right now. You >>should be able to do a gem update within a couple hours. Please let me >>know how it works, and if you have any questions about the library feel >>free to post to the list. >> >>-Jeff > > > I''m very very sorry to inform you that I still get the same error :-( > I have not changed anything in my script, just updated the gem. > I can see it''s using the new gem from the traceback:[SNIP traceback] Are you sure you updated the parser.rb file? diff icalendar-0.96.2/lib/icalendar/parser.rb icalendar-0.96.3/lib/icalendar/parser.rb produces no output. But maybe that''s not the file you have changed. Greetings, Gitte Wange
Jeff Rose
2005-Nov-30 12:22 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
No, it wasn''t a change in the parser file, but in the different component definitions. I have some LAST-MODIFIED properties in my test calendar though so I don''t know what is causing this. Could you send a copy of the calendar that crashes, or at least a portion of it? Thanks, Jeff On Wed, 2005-11-30 at 00:33 +0100, Gitte Wange wrote:> Gitte Wange wrote: > > Jeff Rose wrote: > > > >>Hi Gitte, > >> Thanks for bringing this up. I had incorrectly specified the property > >>name in the definitions of some of the calendar components. I think > >>I''ve fixed the problem, and I''m packaging things up right now. You > >>should be able to do a gem update within a couple hours. Please let me > >>know how it works, and if you have any questions about the library feel > >>free to post to the list. > >> > >>-Jeff > > > > > > I''m very very sorry to inform you that I still get the same error :-( > > I have not changed anything in my script, just updated the gem. > > I can see it''s using the new gem from the traceback: > > [SNIP traceback] > > Are you sure you updated the parser.rb file? > diff icalendar-0.96.2/lib/icalendar/parser.rb > icalendar-0.96.3/lib/icalendar/parser.rb > > produces no output. > > But maybe that''s not the file you have changed. > > Greetings, > Gitte Wange > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel
Jeff Rose
2005-Nov-30 23:39 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
Ok, after a bit of debugging with my most complicated test case yet I''ve fixed the problems. When I added support for timezones a while back I introduced some interesting bugs that only popped up when components showed up in a specific order in a file. (I was accidentally re-defining a class variable of a parent class in a derived class...Standard < Timezone < Component) So, I''ve tested with the problem calendar in a couple ways and I hope the new version on rubyforge will solve all problems :-) Ciao, Jeff
Gitte Wange
2005-Nov-30 23:49 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
Jeff Rose wrote:> Ok, after a bit of debugging with my most complicated test case yet I''ve > fixed the problems. When I added support for timezones a while back I > introduced some interesting bugs that only popped up when components > showed up in a specific order in a file. (I was accidentally > re-defining a class variable of a parent class in a derived > class...Standard < Timezone < Component) > > So, I''ve tested with the problem calendar in a couple ways and I hope > the new version on rubyforge will solve all problems :-) > > Ciao, > JeffWAY to cool! It works - i can parse the icalendar file! Now i just need to figure out how to fetch/put it using webdav ;) Greetings, Gitte Wange
Jeff Rose
2005-Dec-01 09:09 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
Great! As for the webdav, do you have a plan yet for what you are going to be using? There was some discussion on ruby-talk a while back about putting together a calendar server using webdav on top of webrick, but I haven''t heard anything since. Just looking around right now I saw that Why created a DAV gem for a WebDAV plugin for Webrick (gem install webrick-webdav) I was just looking around and it seems the CalDAV specification has been progressing also. A couple projects have implementations so I think what they''ve got so far is just about complete. The spec is under 30 pages so it might not be too hard to put on top of the current dav, xml, ical, and ActionMailer stuff... I might have a look at it this weekend actually. If anyone else is interested it would be great to do some brainstorming. -Jeff On Thu, 2005-12-01 at 00:49 +0100, Gitte Wange wrote:> Jeff Rose wrote: > > Ok, after a bit of debugging with my most complicated test case yet I''ve > > fixed the problems. When I added support for timezones a while back I > > introduced some interesting bugs that only popped up when components > > showed up in a specific order in a file. (I was accidentally > > re-defining a class variable of a parent class in a derived > > class...Standard < Timezone < Component) > > > > So, I''ve tested with the problem calendar in a couple ways and I hope > > the new version on rubyforge will solve all problems :-) > > > > Ciao, > > Jeff > > WAY to cool! > It works - i can parse the icalendar file! > > Now i just need to figure out how to fetch/put it using webdav ;) > > Greetings, > Gitte Wange > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel
Gitte Wange
2005-Dec-01 09:16 UTC
[iCalendar-devel] Error parsing ical file created using Apple''s Ical app
Jeff Rose wrote:> Great! As for the webdav, do you have a plan yet for what you are going > to be using? There was some discussion on ruby-talk a while back about > putting together a calendar server using webdav on top of webrick, but I > haven''t heard anything since. Just looking around right now I saw that > Why created a DAV gem for a WebDAV plugin for Webrick (gem install > webrick-webdav) I was just looking around and it seems the CalDAV > specification has been progressing also. A couple projects have > implementations so I think what they''ve got so far is just about > complete. The spec is under 30 pages so it might not be too hard to put > on top of the current dav, xml, ical, and ActionMailer stuff... > > I might have a look at it this weekend actually. If anyone else is > interested it would be great to do some brainstorming. > > -JeffWell ATM I have all my ical files placed on an Apache server accessing them using WebDav so it would be obvious to just stay on that path. What I need is a sort of webdav-client module for ruby - I found some code snippets that I need to review. All of this calendaring stuff is ATM implemented in a time management product (rtime) that I work on, but I''m thinking about seperating it out as a seperate product. (I''m pretty new to rails products, release styles etc so it might take me a bit time to get hold on all these things). I would be very interested in a brainstorm - perhaps I have time this weekend. Greetings, Gitte Wange