You are not logged in.

#1 2009-03-18 23:44:08

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Offlineimap makes shell unusable? [SOLVED]

Hi! When I sync my Gmail account with offlineimap and the program exits with an exception, I can't write in my terminal anymore.

Better said, I can write, but I don't see anything until I press ENTER. When I press it, I can see everything I have just written and the terminal usually complains about it being nonsense. Moreover, in this "invisible mode" some characters are not recognized, such as BACKSLASH.

Is anyone experiencing similar issues? Should I file a bug on the offlineimap website? (The project looks quite unmantained).

Thanks in advance.

Last edited by iosonofabio (2009-03-19 00:18:23)

Offline

#2 2009-03-18 23:49:29

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: Offlineimap makes shell unusable? [SOLVED]

Try typing "reset".

Offline

#3 2009-03-18 23:50:08

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Offlineimap makes shell unusable? [SOLVED]

Type "reset" to fix the terminal.  I don't have any issues with offlineimap, but I run it via cron.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#4 2009-03-19 00:09:03

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: Offlineimap makes shell unusable? [SOLVED]

Hi! Thanks for the answers. Indeed, an invisile "reset" command does the job of getting my keyboard visible. Anyway, is it normal that a program takes similar control of the terminal? Is it a bug of offlineimap?

Offline

#5 2009-03-19 00:14:11

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Offlineimap makes shell unusable? [SOLVED]

Anytime a program fails and doesn't properly clean up after itself you can run into this.  It'd be best to find out why exactly it's failing first.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#6 2009-03-19 00:17:57

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: Offlineimap makes shell unusable? [SOLVED]

Ok, now it is somehow clearer. I will investigate into it and look closer to the error. This thread is solved for me. Thanks.

Offline

#7 2009-03-19 07:34:41

konni
Member
From: berlin
Registered: 2008-09-25
Posts: 99

Re: Offlineimap makes shell unusable? [SOLVED]

i had some terminal failures with offlineimap too, specifying an other ui for offlineimap solved that for me.
i'm not at my arch box now, but it should be like 'offlineimap -u TTY.TTYUI'

Offline

#8 2009-03-19 09:18:30

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: Offlineimap makes shell unusable? [SOLVED]

Oh yes, the TTY interface does work without messing the terminal. This makes me think that the curses interface implementation of offlineimap is quite buggy. In fact, as I get the python 2.6 error at the start, this scrambles screen messages too (in the curses ui).

Thanks.

Offline

#9 2010-06-28 07:28:05

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Offlineimap makes shell unusable? [SOLVED]

this still happens I believe. thought it maybe my potentially flakey dotfiles here and there. in any event, THANKS for the 'reset' tip. weird discovering that along with some skewing of text the terminal was still alive and working though yes, invisible for typing as mentioned. 

right, so there doesn't appear to be anything other than offlineimap so I'm going to celebrate it by seeing my personal offlineimap saga a great experience!!

Last edited by yvonney (2010-06-28 07:28:30)

Offline

#10 2010-06-28 09:45:58

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: Offlineimap makes shell unusable? [SOLVED]

Hi!

I checked the Python code inside Offlineimap. It seems that the programmer has tried to implement a terminal-safe Curses wrapper for python, but has given up.

Details: there is a python function called Curses_wrapper or similar (can't remember anymore) which makes the whole curses part execute within a try-catch statement. This way, an error in the UI does not make the whole program corrupt the terminal. However, this wrapper is difficult to implement in the Offlineimap code.

In principle, if you're willing to correct this bug, you could just put the whole offlineimap code into this wrapper and it should work.

Cheers,
Fabio

Offline

Board footer

Powered by FluxBB