maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar (https://talk.maemo.org/showthread.php?t=40408)

lorelei 2010-02-01 12:37

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Regarding the xml.utils.iso8601: I will definitely abandon that module, since it's very problematic under certain circumstances.

I will use the dateutil module (additional dependency, but that package is available in Extra).

This means that I have to publish another version before the one with the GUI, since as you can imagine date handling is quite critical in Erminig, so I want to be sure that there is no hidden surprise somewhere with that new module.

Concerning the GUI: I will post a few screenshots of the mock-ups in the next few days.

Palleman 2010-02-01 14:03

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by lorelei (Post 505002)
Next version will allow the user to sync to an already existing calendar, without forcing the creation of a new one.

Never mind the .db fiddling then.

Quote:

Originally Posted by lorelei (Post 505002)
How massive the data source (how many events)? And from where? (Google or local calendar?).

A couple of thousand events from Google to local, at the first sync. It ate CPU (or more accurately, it increased the load quite a bit and made the phone sluggish), not memory. The slowness could also be seen in the output on the screen (slow enough to have time to read it). But I guess that much of this slowness was due to printing all the inserts to screen.

Subsequent syncs are also slow enough to have time to read the output, but since it's only a couple of events each time, it doesn't matter that much.

/P

lorelei 2010-02-01 23:15

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
OK, here's a fixed version for the iso8601 problem. This is the only fix in this release, there's absolutely no new feature compared to 0.1.0.

Since it appears that python2.5-dateutil is not available in Extras yet (it's only in -devel), I've changed the strategy: I'm now bundling the iso8601 module together with erminig. This should fix once for all the problem.

Once python2.5-dateutil is available in Extra I will change the code to use that module and get rid of the one bundled.

I'm also removing the old release from the previous post and redirect here for the downloads.

thank you for the patience and for the help pin-pointing the problem!

Updated version of Erminig-NG can be downloaded here:

http://talk.maemo.org/showpost.php?p...&postcount=128

Version 0.1.1 that was previously here has been removed, since it contained a bug.

dreixel 2010-02-02 07:09

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Now I'm getting:

Code:

Traceback (most recent call last):
  File "erminig-ng", line 43, in <module>
    import cwrapper
  File "/home/user/MyDocs/.documents/erminig-ng-0.1.1/cwrapper.py", line 13, in <module>
    lib = cdll.LoadLibrary(erminig_conf.libpath + "/libcalaccess.so")
  File "/usr/lib/python2.5/ctypes/__init__.py", line 431, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.5/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/user/MyDocs/.documents/erminig-ng-0.1.1/libcalaccess.so: failed to map segment from shared object: Operation not permitted


lorelei 2010-02-02 07:23

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by dreixel (Post 506329)
Now I'm getting:

Code:

Traceback (most recent call last):
  File "erminig-ng", line 43, in <module>
    import cwrapper
  File "/home/user/MyDocs/.documents/erminig-ng-0.1.1/cwrapper.py", line 13, in <module>
    lib = cdll.LoadLibrary(erminig_conf.libpath + "/libcalaccess.so")
  File "/usr/lib/python2.5/ctypes/__init__.py", line 431, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.5/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/user/MyDocs/.documents/erminig-ng-0.1.1/libcalaccess.so: failed to map segment from shared object: Operation not permitted


the erminig-ng C++ layer (libcalaccess.so) cannot reside in the MyDocs directory, since it is mounted with noexec. Best solution: move the erminig-ng-0.1.1 directory directly to your homedirectory (/home/users), instead of having it in the MyDocs folder.

hope this helps!

dreixel 2010-02-02 07:33

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Thanks, that worked, but now I have other problem:

Code:

Traceback (most recent call last):
  File "erminig-ng", line 524, in <module>
    syncNewEvents()
  File "erminig-ng", line 503, in syncNewEvents
    getNewEventsFromGoogle(lastSync)
  File "erminig-ng", line 302, in getNewEventsFromGoogle
    cdate = iso8601ToTimestamp(e.published.text)
  File "erminig-ng", line 249, in iso8601ToTimestamp
    return int(iso8601.parse(date))
  File "/home/user/erminig-ng-0.1.1/iso8601.py", line 24, in parse
    return time.mktime(gmt) + __extract_tzd(m) - time.timezone
OverflowError: mktime argument out of range

This when running "python2-5 erminig-ng", after having run "python2-5 erminig-ng --sync-calendars". My N900 calendar looks unchanged (empty).

lorelei 2010-02-02 09:51

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by dreixel (Post 506351)
Thanks, that worked, but now I have other problem:

Code:

Traceback (most recent call last):
  File "erminig-ng", line 524, in <module>
    syncNewEvents()
  File "erminig-ng", line 503, in syncNewEvents
    getNewEventsFromGoogle(lastSync)
  File "erminig-ng", line 302, in getNewEventsFromGoogle
    cdate = iso8601ToTimestamp(e.published.text)
  File "erminig-ng", line 249, in iso8601ToTimestamp
    return int(iso8601.parse(date))
  File "/home/user/erminig-ng-0.1.1/iso8601.py", line 24, in parse
    return time.mktime(gmt) + __extract_tzd(m) - time.timezone
OverflowError: mktime argument out of range

This when running "python2-5 erminig-ng", after having run "python2-5 erminig-ng --sync-calendars". My N900 calendar looks unchanged (empty).

Wild guess: you have an event in Google calendar which is starting after 2037. UNIX timestamps are limited to values until early 2037 IIRC, so this may explain the problem.

I will probably have to clip the dates after the maximum timestamp, since they cannot be managed correctly by Python...

dreixel 2010-02-02 10:07

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by lorelei (Post 506468)
Wild guess: you have an event in Google calendar which is starting after 2037. UNIX timestamps are limited to values until early 2037 IIRC, so this may explain the problem.

Well, I have recurring events coming once every year with no end date (like birthdays), but I thought erminig was ignoring recurring events...

dreixel 2010-02-02 10:24

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Also, I have a feature request. It would be nice to have a switch to perform only one-way synchronization (namely from Google to N900). This also makes it safer for users who want to make sure their Google Calendar will not be altered in any way.

Domenech 2010-02-02 11:45

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by lorelei (Post 503142)
Feel free to drop me a message if you find a bug (or just if you find this piece of software useful): those are always appreciated!

Download of erminig-ng 0.1.1 is available in this post:

http://talk.maemo.org/showpost.php?p...7&postcount=93

it fixes the iso8601 problem a few users had. I've removed the original 0.1.0 release, since it was bugged!

Hi, lorelei

I've tried your software and I receive the next error:

Code:

File "erminig-ng", line 43, in <module>
  import cwrapper
File "/home/user/MyDocs/erminig-ng/erminig-ng-0.1.1/cwrapper.py", line 13, in module>
  lib = cd11.LoadLibrary(erminig_conf.libpath + "/libcalccess.so")
File "/usr/lib/python2.5/ctypes/__init__.py", line 431, in LoadLibrary
      return self._dlltype(name)
File "/usr/lib/python2.5/ctypes/__init__.py", line 348, in __init__
      self.handle = _dlopen(self._name, mode)
ODError: /home/user/MyDocs/erminig-ng/erminig-ng-0.1.1/libcalaccess.so: failed to map segment form shared object: Operation not permitted

My erminig_conf.py file:
Code:

google_username = "my_username"
google_password = "my_password"

libpath = "/home/user/MyDocs/erminig-ng/erminig-ng-0.1.1"

maxattempts = 4

Thanks for your time


All times are GMT. The time now is 09:59.

vBulletin® Version 3.8.8