[Dev] getting an assertion trying to create item
Katie Capps Parlante
capps at osafoundation.org
Mon Mar 8 12:15:00 PST 2004
Hi bear,
comments below...
bear wrote:
> Yep, once I loaded the mail parcel that error went away.
>
> I also found out that it's tied to the repository global (which only
> makes sense) and to get around having to load in the entire chandler gui
> I set that global to the repository I create for testing.
Indeed, the application or framework needs to set up the repository, and
right now the parcels get access to it through this global.
> Creating instances of MailMessage and EmailAccount is working fine
> except that the attribute downloadedMail (for EmailAccount) does not
> seem to be set when an instance of EmailAccount is created. Do I need
> to call setAttributeValue for this?
Yes, you'll need to set it, all of the python classes that correspond to
Mail kinds are very thin at the moment. One thing to keep in mind: we've
done just enough work on the mail schema to capture some of the design
team's thinking, and to support Stuart playing with it for agents, and
not much more. I know that you've added comments about contacts and mail
to the end of the project page:
http://wiki.osafoundation.org/twiki/bin/view/Chandler/ContentModel.
Capturing the list of issues that you run into in this exercise would
also be a welcome addition. ;)
Cheers,
Katie
bear wrote:
> Yep, once I loaded the mail parcel that error went away.
>
> I also found out that it's tied to the repository global (which only
> makes sense) and to get around having to load in the entire chandler gui
> I set that global to the repository I create for testing.
>
> Creating instances of MailMessage and EmailAccount is working fine
> except that the attribute downloadedMail (for EmailAccount) does not
> seem to be set when an instance of EmailAccount is created. Do I need
> to call setAttributeValue for this?
>
> thanks,
> bear
>
>
> Katie Capps Parlante wrote:
>
>> Hi bear,
>>
>> We just talked about this on irc, but I'll compose a quick reply here
>> in case anyone else is interested...
>>
>> You're getting the error because you're trying to use parcel code
>> (OSAF.contentmodel.mail is from a parcel, OSAF/contentmodel/mail),
>> when the parcel hasn't yet been loaded into the repository. The
>> MailMessage Kind does not yet exist in the repository -- that's what
>> the error message is trying to convey.
>>
>> Cheers,
>> Katie
>>
>> bear wrote:
>>
>>> It's probably my addled brain but here goes:
>>>
>>> In this snippet of python code I get an assertion error: assert
>>> cls.mailMessageKindID, "Mail message not yet loaded"
>>>
>>> from OSAF.contentmodel.mail.Mail import MailMessage
>>>
>>> msg = MailMessage()
>>>
>>> now there is a bunch of stuff around this but I know it's probably
>>> something really silly
>>>
>>> thanks,
>>> bear
>>>
>>>
>>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>>>
>>> Open Source Applications Foundation "Dev" mailing list
>>> http://lists.osafoundation.org/mailman/listinfo/dev
>>
>>
>>
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev
More information about the Dev
mailing list