Skip to content
This repository has been archived by the owner. It is now read-only.

Breaks with python-vobject 0.6.6 #228

Closed
macosforgebot opened this issue Jun 20, 2008 · 11 comments
Closed

Breaks with python-vobject 0.6.6 #228

macosforgebot opened this issue Jun 20, 2008 · 11 comments

Comments

@macosforgebot
Copy link

@macosforgebot macosforgebot commented Jun 20, 2008

@agx originally submitted this as ticket:287

  • Cc: @agx, jeffrey@…

When replacing python-vobject 0.6.0 by 0.6.6 one gets and exception when trying to add a new appointment. Exception is attached to this report. This is calendarserver 1.2

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jun 20, 2008

@agx originally submitted this as attachment:vo-0.6.6-exception.txt:⁠ticket:287


Exception Traceback

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jul 17, 2008

@wsanchez originally submitted this as comment:1:⁠ticket:287

  • Owner changed from @wsanchez to @cyrusdaboo
  • Priority changed from 5: Not set to 2: Expected
  • Milestone set to 2.x

I guess we don't strictly have to fix this until we upgrade the version of vobject we use, but we probably should get on this before a possibly small bug becomes a possibly bigger one.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jul 24, 2008

@agx originally submitted this as comment:2:⁠ticket:287


Being stuck at a certain vobject version doesn't seem ideal since we might be missing out on other fixes.

From the report it seems that something previously hashable turned into a list. Maybe Jeffrey has an immediate idea?

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jul 24, 2008

jeffrey@… originally submitted this as comment:3:⁠ticket:287


I'm sorry, I could've sworn I sent an email about this change to Cyrus, but looking back at my sent mail it looks like I didn't.

vobject uses lists for pretty much everything, including parameters. It was a bug (that was causing exceptions in certain use cases) that X-VOBJ-ORIGINAL-TZID was being stored as a plain value, not a single-valued-list.

I was going to say: to fix this, use getattr(property, 'x_vobj_original_tzid_param', None) instead of property.params().get()

but I'm not sure what's going on with params being a function. So alternately, do property.params().get('X-VOBJ-ORIGINAL-TZID', [None])[0]

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 14, 2008

@wsanchez originally submitted this as comment:4:⁠ticket:287

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 14, 2008

@wsanchez originally submitted this as comment:5:⁠ticket:287


Jeffrey, params() is a method on the Property class in our code.

I assume the same true for fetching 'TZID' in the previous line.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 14, 2008

@wsanchez originally submitted this as comment:6:⁠ticket:287

  • Status changed from assigned to closed
  • Resolution set to fixed

r2825 updates to r208 in vobject and handles single-value parameters as list or non-list. (Looks like vobject r208 still returns some parameters as non-lists.)

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 14, 2008

jeffrey@… originally submitted this as comment:7:⁠ticket:287


Cool, glad it's fixed.

Can you tell me which parameters are still being returned as non-lists? I'd like to fix that.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 14, 2008

@wsanchez originally submitted this as comment:8:⁠ticket:287


Actually, it still returns a non-list for X-VOBJ-ORIGINAL-TZID in r208 when I run it.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 14, 2008

@wsanchez originally submitted this as comment:9:⁠ticket:287


Wait, looks like my PYTHONPATH is wrong

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 14, 2008

@wsanchez originally submitted this as comment:10:⁠ticket:287


OK, never mind, not a problem. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.