From gitte at wange.dk Wed Nov 23 12:56:23 2005 From: gitte at wange.dk (Gitte Wange) Date: Wed, 23 Nov 2005 18:56:23 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app Message-ID: <4384AD47.2030104@wange.dk> 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 From jeff at rosejn.net Tue Nov 29 13:32:44 2005 From: jeff at rosejn.net (Jeff Rose) Date: Tue, 29 Nov 2005 19:32:44 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app In-Reply-To: <4384AD47.2030104@wange.dk> References: <4384AD47.2030104@wange.dk> Message-ID: <1133289164.8457.29.camel@localhost.localdomain> 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 From jeff at rosejn.net Tue Nov 29 14:10:47 2005 From: jeff at rosejn.net (Jeff Rose) Date: Tue, 29 Nov 2005 20:10:47 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app In-Reply-To: <1133289164.8457.29.camel@localhost.localdomain> References: <4384AD47.2030104@wange.dk> <1133289164.8457.29.camel@localhost.localdomain> Message-ID: <1133291447.8457.33.camel@localhost.localdomain> 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 From gitte at wange.dk Tue Nov 29 18:29:13 2005 From: gitte at wange.dk (Gitte Wange) Date: Wed, 30 Nov 2005 00:29:13 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app In-Reply-To: <1133289164.8457.29.camel@localhost.localdomain> References: <4384AD47.2030104@wange.dk> <1133289164.8457.29.camel@localhost.localdomain> Message-ID: <438CE449.9040605@wange.dk> 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: 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 From gitte at wange.dk Tue Nov 29 18:33:37 2005 From: gitte at wange.dk (Gitte Wange) Date: Wed, 30 Nov 2005 00:33:37 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app In-Reply-To: <438CE449.9040605@wange.dk> References: <4384AD47.2030104@wange.dk> <1133289164.8457.29.camel@localhost.localdomain> <438CE449.9040605@wange.dk> Message-ID: <438CE551.2080807@wange.dk> 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 From jeff at rosejn.net Wed Nov 30 07:22:37 2005 From: jeff at rosejn.net (Jeff Rose) Date: Wed, 30 Nov 2005 13:22:37 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app In-Reply-To: <438CE551.2080807@wange.dk> References: <4384AD47.2030104@wange.dk> <1133289164.8457.29.camel@localhost.localdomain> <438CE449.9040605@wange.dk> <438CE551.2080807@wange.dk> Message-ID: <1133353357.8457.36.camel@localhost.localdomain> 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 From jeff at rosejn.net Wed Nov 30 07:22:37 2005 From: jeff at rosejn.net (Jeff Rose) Date: Wed, 30 Nov 2005 13:22:37 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app In-Reply-To: <438CE551.2080807@wange.dk> References: <4384AD47.2030104@wange.dk> <1133289164.8457.29.camel@localhost.localdomain> <438CE449.9040605@wange.dk> <438CE551.2080807@wange.dk> Message-ID: <1133353357.8457.36.camel@localhost.localdomain> 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 From jeff at rosejn.net Wed Nov 30 18:39:03 2005 From: jeff at rosejn.net (Jeff Rose) Date: Thu, 01 Dec 2005 00:39:03 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app In-Reply-To: <438CE551.2080807@wange.dk> References: <4384AD47.2030104@wange.dk> <1133289164.8457.29.camel@localhost.localdomain> <438CE449.9040605@wange.dk> <438CE551.2080807@wange.dk> Message-ID: <1133393943.19942.5.camel@localhost.localdomain> 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 From gitte at wange.dk Wed Nov 30 18:49:23 2005 From: gitte at wange.dk (Gitte Wange) Date: Thu, 01 Dec 2005 00:49:23 +0100 Subject: [iCalendar-devel] Error parsing ical file created using Apple's Ical app In-Reply-To: <1133393943.19942.5.camel@localhost.localdomain> References: <4384AD47.2030104@wange.dk> <1133289164.8457.29.camel@localhost.localdomain> <438CE449.9040605@wange.dk> <438CE551.2080807@wange.dk> <1133393943.19942.5.camel@localhost.localdomain> Message-ID: <438E3A83.50105@wange.dk> 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