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
importing .ICS on the with_heroku branch #25
Comments
p.s. here is the .ics url I was using: |
The calendar is here http://sudoroom.org/calendar/ with an export here webcal://sudoroom.org/?plugin=all-in-one-event-calendar&controller=ai1ec_exporter_controller&action=export_events&cb=966118952 I believe Max piped this webcal export thorugh a google calendar to get an .ICS file. I updated a location-missing event with a non-null location, but still got: "ERROR: Unable to import: Unknown error: Validation failed: Title can't be blank" I see no 'Title' element of the iCal spec... thinking this is an error from Calagator. |
someone in #pdxtech IRC told me they got the calagator model specs to pass On Mon, Feb 4, 2013 at 9:57 AM, wrought notifications@github.com wrote:
|
ahha, calagator uses the 'summary' property in ical for the event.title now to figure out why it fails when there are summaries on all events in On Mon, Feb 4, 2013 at 10:00 AM, Max Ogden max@maxogden.com wrote:
|
You do not need to run Pg locally to test things, the Gemfile should have:
|
Was a solution to this ever found? I am trying to set up a calagator instance, and the first thing I did was point it at a google-based ical feed, and got the same error. The feed I am using is: https://www.google.com/calendar/ical/info%40nottinghack.org.uk/public/basic.ics And I'm getting the same error message. ERROR: Unable to import: Unknown error: Validation failed: Title can't be blank Just cloned the code today. |
I haven't found a solution yet. If you know a rails dev with some free time On Thu, Apr 18, 2013 at 1:44 PM, Matthew Gates notifications@github.comwrote:
|
I'm trying to learn rails, and I plan to have a look at it, but I don't know if my knowledge is good enough yet to figure it out. I'll post anything I find to this thread. |
Not solved yet, but I have some more information. The problem occurs when event.save! is called in source.create_events. An ActiveRecord::RecordInvalid exception is thrown. I extracted the following backtrace (line numbers will be a little off in the app code because I added bunch of logging). I'm not entirely sure how to interpret this:
|
It seems to be something in the ICS parser itself - specifically handling HTML tags and escapes in descriptions can trigger it. For example, look at these two feeds: The only difference is that bad has a description containing a bunch of HTML and other stuff. What's weird is that this event isn't even active (the date is in the past), but it still prevents the good event being added. Yay, progress! |
I think the problem is multi-byte characters in the feed. When I ran it through a UTF -> ASCII converter, the whole giant feed loaded just fine. The £ symbol in the description of the second item in the tests above seems to be what did it. You can see a full, working feed here: http://porpoisehead.net/cal/ascii.ics |
Wow, nice work--think a patch to handle Unicode will be possible, or is converting to ASCII necessary? Cheers! // Matt ----- Reply message ----- You can see a full, working feed here: http://porpoisehead.net/cal/ascii.ics — |
My feeling is that UTF-8 should be legal in text fields, or at least Calagator shouldn't refuse to import everything else if it finds some. I'm trying to work out where this is done at the moment. I assume in app/models/source_parser somewhere. I'll look at it again shortly and create a patch if I can, or just comment here if I can't work it out. |
I haven't done ruby in a few years but here is some code for converting UTF8 to ASCII that may be useful here: https://github.com/maxogden/shp2geocouch/blob/master/bin/shp2geocouch#L92-L93 I would take a crack at implementing it here but I'd need someone to give me a command or set of commands I can run that will run the source_parser model tests (from scratch, assuming I have 0 rails experience -- which is pretty close to true nowadays) |
Is this still an existing issue? |
hiya!
I'm trying to get a calendar set up for the oakland tech community. I have it running here: http://oaklandar.herokuapp.com
However, I get
ERROR: Unable to import: Unknown error: Validation failed: Title can't be blank
when trying to import a .ics URL from a public google calendarnow im trying to figure out how to run source_parser_ical_spec.rb locally to see if it passes on the with_heroku but I don't have postgres installed. is there a way to run that test in isolation? I would also be grateful for any tips on getting ICS import working
The text was updated successfully, but these errors were encountered: