×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    32

    Exclamation PySide + QtOrganizer = I'm going crazy!

    Hi boys and girls,

    I'm going crazy because I have NO idea why the hell my app is not doing what I want.

    I want to allow the user to write a selected date in the N9 calendar and so I use QOrganizer, here is my (wip) code to do this:

    Code:
    #-*- coding: utf-8 -*-
    
    import sys
    from PySide import QtCore
    from QtMobility.Organizer import *
    
    class Save(QtCore.QObject):
        def __init__(self):
            QtCore.QObject.__init__(self)
            print "-------------------------------------"
            start = "23.02.2012"
            end = "23.02.2012"
            name = u"my birthday"
            self.saveItem(start, end, name)
    
    
        def saveItem(self, start, end, name):
            startTime = QtCore.QDateTime.fromString(start,'dd.MM.yyyy')
            endTime = QtCore.QDateTime.fromString(end,'dd.MM.yyyy')
            organizer = QOrganizerManager()
    
            event = QOrganizerEvent()
            event.setDisplayLabel(str(name))
            event.setStartDateTime(startTime)
            event.setEndDateTime(endTime)
            event.setAllDay(True)
    
            organizer.saveItem(event)
            print "safed"
    
            sys.exit(0)
    
    if __name__ == "__main__":
        app = QtCore.QCoreApplication([])
        test = Save()
        app.exec_()
    This code works and write the date in my calendar.

    BUT:

    If I'm importing/or using exactly the same code of saveItem function, it is NOT working. But I don't understand WHY THE HELL NOT! In console it's running and tells me that it writes the event to calendar, but it don't shows up.

    My only clue is the following error message, but I get this message by running the above code also.

    Code:
    QTrackerResult: QSparqlError(9, "Rejected send message, 3 matched rules; type="method_call", sender=":1.224" (uid=29999 pid=4268 comm="python freiertag.py ") interface="org.freedesktop.Tracker1.Resources" member="SparqlUpdateBlank" error name="(unset)" requested_reply=0 destination="org.freedesktop.Tracker1" (uid=29999 pid=1317 comm="/usr/lib/tracker/tracker-store "))", 1) "INSERT { <urn:x-ical:3defc125-8ff3-48df-8a75-10fde672a0ac> a ncal:Event, nie:DataObject; ncal:uid <3defc125-8ff3-48df-8a75-10fde672a0ac>; ncal:dtstart [ a ncal:NcalDateTime; ncal:dateTime '2011-03-03T00:00:00+01:00'; ncal:ncalTimezone <urn:x-ical:timezone:Europe/Berlin> ]; ncal:dtend [ a ncal:NcalDateTime; ncal:dateTime '2011-03-03T00:00:00+01:00'; ncal:ncalTimezone <urn:x-ical:timezone:Europe/Berlin> ]; ncal:transp ncal:opaqueTransparency; ncal:summary 'Weiberfastnacht'; ncal:class ncal:publicClassification; ncal:priority 0; ncal:dtstamp '2012-02-24T21:57:31Z'; ncal:created '2012-02-24T21:57:31Z'; nie:contentCreated '2012-02-24T21:57:31Z'; ncal:lastModified '2012-02-24T21:57:31Z'; ncal:sequence 0; ncal:url <urn:x-ical:3defc125-8ff3-48df-8a75-10fde672a0ac>; nie:isLogicalPartOf <urn:x-ical:3ba5540f-da66-40cb-9026-8bf1adacc952> . <urn:x-ical:3ba5540f-da66-40cb-9026-8bf1adacc952> a ncal:Calendar } "
    Is there somebody with an idea what's wrong here? I could, also post you the whole main application code, but there is nothing special. With print I also checked, that the function got the right types (str/unicode).

    Thank you very very much in advance!

    AlphaX2

  2. #2
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: PySide + QtOrganizer = I'm going crazy!

    Hi,

    Are you using the aegis tokens needed for organizer api -

    QtMobility Organizer

    * GRP::calendar
    * GRP::metadata-users
    * TrackerReadAccess
    * TrackerWriteAccess

    http://www.developer.nokia.com/Commu...ecurity_Tokens

    Need to check if some documentation is available on how to include the manifest.aegis to the python src package.

  3. #3
    Registered User
    Join Date
    Feb 2012
    Posts
    32

    Re: PySide + QtOrganizer = I'm going crazy!

    Hi again,

    I had no time to try this, but it sounds/looks like the solution. I think I'm able to add a manifest file manually.
    But is there also a way to give my WIP applications access to APIs functions, without creating and installing everytime a deb file?

    Thanks in advance.

    AlphaX2

  4. #4
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: PySide + QtOrganizer = I'm going crazy!

    Hi,

    There is a tool called aegis-su to give the permissions required to our exec, if you are starting your app from terminal/commandline
    you can use the below -

    aegis-su -r TrackerReadAccess,TrackerWriteAccess python ./<yourapp>

  5. #5
    Registered User
    Join Date
    Feb 2012
    Posts
    32

    Re: PySide + QtOrganizer = I'm going crazy!

    Hi again,

    do I have to install aegis-su, because my N9 tells me it don't know this command. :-\

    AlphaX2
    Last edited by AlphaX2; 2012-03-03 at 10:19.

  6. #6
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: PySide + QtOrganizer = I'm going crazy!

    It comes with aegis-dss-tools package and is not available on production images.

  7. #7
    Registered User
    Join Date
    Feb 2012
    Posts
    32

    Re: PySide + QtOrganizer = I'm going crazy!

    Hi,

    I hope this is my last question
    Is there a special repo or a direct download for this package, or is there no way to get it for the N9?
    Because I tried standard repo with apt-get and also I did not find anything via Google?!

    Thanks again in advance.

    AlphaX2

  8. #8
    Registered User
    Join Date
    Feb 2012
    Posts
    32

    Re: PySide + QtOrganizer = I'm going crazy!

    Ok guys,

    I've some news. First of all since PR1.2 it crashed with SegFault, BUT: It seems that is/was aegis related.
    At the moment I am looking for a way to use manifest.aegis with a Nokia Store compatible package building system (Python/PySide).

    BUT: More interesting is the following fact:

    The problem is the same like before. Also with all rights enabled (I'd used Inception: http://talk.maemo.org/showthread.php?t=82835), using the code I published here is no problem and the event is added in the calendar successful, but importing it will not work. :-/

    Any ideas?

    AlphaX2

Similar Threads

  1. PySide Assistant on Mac
    By rishabh11 in forum Nokia N9
    Replies: 1
    Last Post: 2011-09-08, 09:13
  2. PySide / Ovi Store
    By Khertan in forum [Closed] Publishing to Nokia Store
    Replies: 0
    Last Post: 2011-06-27, 10:36
  3. Pyside QT on 64bit
    By wexcel in forum [Archived] Qt SDKs and Tools
    Replies: 1
    Last Post: 2011-04-15, 19:31
  4. PySide for s60/Symbian?
    By gotan in forum Symbian
    Replies: 1
    Last Post: 2010-07-30, 00:10
  5. How to use OpenGL with PySide (Python-Qt)?
    By TomiS in forum Nokia N9
    Replies: 5
    Last Post: 2010-01-19, 15:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×