Crashes on startup

Bug #365477 reported by Børre Gaup
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Medium
Bertrand Rousseau
PyRoom
Fix Committed
Medium
Florian Heinle

Bug Description

When I start up gtg (from the commandline), I get this message:
gtg
Traceback (most recent call last):
  File "/usr/bin/gtg", line 30, in <module>
    import sys, GTG.gtg
  File "/usr/lib/python2.6/dist-packages/GTG/__init__.py", line 78, in <module>
    fallback=True)
  File "/usr/lib/python2.6/gettext.py", line 480, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "/usr/lib/python2.6/gettext.py", line 437, in find
    for nelang in _expand_lang(lang):
  File "/usr/lib/python2.6/gettext.py", line 132, in _expand_lang
    locale = normalize(locale)
  File "/usr/lib/python2.6/locale.py", line 333, in normalize
    fullname = localename.lower()
AttributeError: 'list' object has no attribute 'lower'

This also happens when I try to start it like this: LC_ALL=C gtg

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

Which version are you using? Are you using the tarball or the package? Could you also tell us what locale you're using? Thanks

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Could you also try with the bzr checkout ? (I believe I've fixed a similar bug a while ago)

Revision history for this message
Børre Gaup (boerre) wrote :

I use the ppa version: gtg_0.1.1~jaunty1_all.deb
My locale is se_NO.UTF-8. I have set it like this: LC_ALL=se_NO.UTF-8
Kubuntu Jaunty fully updated is my distribution.

I checked out gtg like this: bzr branch lp:gtg, and when I run ./gtg I get exactly the same error:
Traceback (most recent call last):
  File "./gtg", line 30, in <module>
    import sys, GTG.gtg
  File "/home/boerre/Dokumenter/gtg/GTG/__init__.py", line 78, in <module>
    fallback=True)
  File "/usr/lib/python2.6/gettext.py", line 480, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "/usr/lib/python2.6/gettext.py", line 437, in find
    for nelang in _expand_lang(lang):
  File "/usr/lib/python2.6/gettext.py", line 132, in _expand_lang
    locale = normalize(locale)
  File "/usr/lib/python2.6/locale.py", line 333, in normalize
    fullname = localename.lower()
AttributeError: 'list' object has no attribute 'lower'

I also tried LC_ALL=C ./gtg and LC_ALL=nb_NO.UTF-8 ./gtg with the same results

Revision history for this message
Børre Gaup (boerre) wrote :

My python version is 2.6.2, by the way.
I also tried to run gtg like this:
python2.5 gtg
It gave the same error, but with different line numbers.
Traceback (most recent call last):
  File "gtg", line 30, in <module>
    import sys, GTG.gtg
  File "/home/boerre/Dokumenter/gtg/GTG/__init__.py", line 78, in <module>
    fallback=True)
  File "/usr/lib/python2.5/gettext.py", line 480, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "/usr/lib/python2.5/gettext.py", line 437, in find
    for nelang in _expand_lang(lang):
  File "/usr/lib/python2.5/gettext.py", line 132, in _expand_lang
    locale = normalize(locale)
  File "/usr/lib/python2.5/locale.py", line 298, in normalize
    fullname = localename.lower()
AttributeError: 'list' object has no attribute 'lower'

python3.0 had no gtk module, but that's probably the way it should be ;)

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

I really don't see what is happening (nor can I reproduce the problem). Is it possible that it's a bug with your python installation ?

You say : "My python version is 2.6.2"

but it looks like it's calling python2.5

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Barre > Can you, in a console, type "python" then paste here the output of :

>>> import locale
>>> locale.getdefaultlocale()

Thanks

Revision history for this message
Børre Gaup (boerre) wrote :

python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('se_NO', 'UTF8')

Revision history for this message
Børre Gaup (boerre) wrote :

I had a glance at the source and noticed you had fetched your translation setup from pyroom. I downloaded the 0.4.1 version of pyroom and got the same error.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Børre > This is really helpful. I add pyroom to this bug and I hope that they will help us to debug this issue.

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote : Re: [Bug 365477] Re: Crashes on startup

I have no idea what this is all about. As far as I can see, the
gettext.translation function is correctly used:
http://docs.python.org/library/gettext.html

Could you post here the content of those environnement variables:
LANGUAGE, LC_ALL, LC_MESSAGES, LANG ?

On Mon, Apr 27, 2009 at 4:32 PM, Lionel Dricot <email address hidden> wrote:
> Børre > This is really helpful. I add pyroom to this bug and I hope that
> they will help us to debug this issue.
>
> ** Also affects: pyroom
>   Importance: Undecided
>       Status: New
>
> --
> Crashes on startup
> https://bugs.launchpad.net/bugs/365477
> You received this bug notification because you are a member of Gtg
> developers, which is the registrant for Getting Things GNOME!.
>
> Status in Getting Things GNOME!: New
> Status in PyRoom: distraction-free writing: New
>
> Bug description:
> When I start up gtg (from the commandline), I get this message:
> gtg
> Traceback (most recent call last):
>  File "/usr/bin/gtg", line 30, in <module>
>    import sys, GTG.gtg
>  File "/usr/lib/python2.6/dist-packages/GTG/__init__.py", line 78, in <module>
>    fallback=True)
>  File "/usr/lib/python2.6/gettext.py", line 480, in translation
>    mofiles = find(domain, localedir, languages, all=1)
>  File "/usr/lib/python2.6/gettext.py", line 437, in find
>    for nelang in _expand_lang(lang):
>  File "/usr/lib/python2.6/gettext.py", line 132, in _expand_lang
>    locale = normalize(locale)
>  File "/usr/lib/python2.6/locale.py", line 333, in normalize
>    fullname = localename.lower()
> AttributeError: 'list' object has no attribute 'lower'
>
> This also happens when I try to start it like this: LC_ALL=C gtg
>

--
Bertrand Rousseau
Place communale 1, 1450 Chastre, Belgium
e-mail : <email address hidden>
tel : +32 485 96 69 86

Revision history for this message
Børre Gaup (boerre) wrote :

~ $ echo $LANGUAGE
se_NO:nb_NO:nb:no_NO:no:nn_NO:nn
~ $ echo $LC_ALL
se_NO.UTF-8
~ $ echo $LC_MESSAGES

~ $ echo $LANG
se_NO.UTF-8

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

On my computer, LANGUAGE is empty. By setting $LANGUAGE to your value,
I could reproduce the bug.

Those lines are responsible:

if lang_in_env:
     languages_used.append(lang_in_env.split())

The languages list is inserted in the list whereas it should be extended.

It is fixed and commited in r245. Could you test it, please?

2009/4/27 Børre Gaup <email address hidden>:
> ~ $ echo $LANGUAGE
> se_NO:nb_NO:nb:no_NO:no:nn_NO:nn
> ~ $ echo $LC_ALL
> se_NO.UTF-8
> ~ $ echo $LC_MESSAGES
>
> ~ $ echo $LANG
> se_NO.UTF-8
>
> --
> Crashes on startup
> https://bugs.launchpad.net/bugs/365477
> You received this bug notification because you are a member of Gtg
> developers, which is the registrant for Getting Things GNOME!.
>
> Status in Getting Things GNOME!: New
> Status in PyRoom: distraction-free writing: New
>
> Bug description:
> When I start up gtg (from the commandline), I get this message:
> gtg
> Traceback (most recent call last):
>  File "/usr/bin/gtg", line 30, in <module>
>    import sys, GTG.gtg
>  File "/usr/lib/python2.6/dist-packages/GTG/__init__.py", line 78, in <module>
>    fallback=True)
>  File "/usr/lib/python2.6/gettext.py", line 480, in translation
>    mofiles = find(domain, localedir, languages, all=1)
>  File "/usr/lib/python2.6/gettext.py", line 437, in find
>    for nelang in _expand_lang(lang):
>  File "/usr/lib/python2.6/gettext.py", line 132, in _expand_lang
>    locale = normalize(locale)
>  File "/usr/lib/python2.6/locale.py", line 333, in normalize
>    fullname = localename.lower()
> AttributeError: 'list' object has no attribute 'lower'
>
> This also happens when I try to start it like this: LC_ALL=C gtg
>

--
Bertrand Rousseau
Place communale 1, 1450 Chastre, Belgium
e-mail : <email address hidden>
tel : +32 485 96 69 86

Changed in gtg:
assignee: nobody → bertrand-rousseau
importance: Undecided → Medium
milestone: none → 0.2
status: New → Fix Committed
Revision history for this message
Florian Heinle (tiax) wrote :

Hi, thanks for your report!

Bertrand, I've fixed the issue in PyRoom with the same solution, looks good.

Changed in pyroom:
assignee: nobody → tiax
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Børre Gaup (boerre) wrote :

I have done bzr up for a few days now, but am stuck at r244 for some reason (also tried a bzr checkout some days ago), and thus gtg don't work. But, I tested pyroom r183 and that worked for me :)
Thanks for fixing this bug :)

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

My bad! :-s I forgot to push the latest commit. Sorry for the inconvenience!

2009/5/4 Børre Gaup <email address hidden>:
> I have done bzr up for a few days now, but am stuck at r244 for some reason (also tried a bzr checkout some days ago), and thus gtg don't work. But, I tested pyroom r183 and that worked for me :)
> Thanks for fixing this bug :)
>
> --
> Crashes on startup
> https://bugs.launchpad.net/bugs/365477
> You received this bug notification because you are a member of Gtg
> developers, which is the registrant for Getting Things GNOME!.
>
> Status in Getting Things GNOME!: Fix Committed
> Status in PyRoom: distraction-free writing: Fix Committed
>
> Bug description:
> When I start up gtg (from the commandline), I get this message:
> gtg
> Traceback (most recent call last):
>  File "/usr/bin/gtg", line 30, in <module>
>    import sys, GTG.gtg
>  File "/usr/lib/python2.6/dist-packages/GTG/__init__.py", line 78, in <module>
>    fallback=True)
>  File "/usr/lib/python2.6/gettext.py", line 480, in translation
>    mofiles = find(domain, localedir, languages, all=1)
>  File "/usr/lib/python2.6/gettext.py", line 437, in find
>    for nelang in _expand_lang(lang):
>  File "/usr/lib/python2.6/gettext.py", line 132, in _expand_lang
>    locale = normalize(locale)
>  File "/usr/lib/python2.6/locale.py", line 333, in normalize
>    fullname = localename.lower()
> AttributeError: 'list' object has no attribute 'lower'
>
> This also happens when I try to start it like this: LC_ALL=C gtg
>

--
Bertrand Rousseau
Place communale 1, 1450 Chastre, Belgium
e-mail : <email address hidden>
tel : +32 485 96 69 86

Changed in gtg:
milestone: 0.2 → 0.1.2
Changed in gtg:
status: Fix Committed → Fix Released
Revision history for this message
Richard Mueller (richovich) wrote :

looks for me as if this has been the same bug then in pyroom:
a line in __init__.py like
    languages_used.append(lang_in_env.split(':'))
should be replaced by:
    languages_used.extend(lang_in_env.split(':'))

it is fixed in version 0.1.2

Revision history for this message
Gergely Imreh (imrehg) wrote :

Hi,
I can see that this bug is fixed in the development trunk which uses the version number 0.4.2, but that does not seem to be announced as THE 0.4.2 release. Ubuntu then still uses 0.4.1 which has this bug... Is there a chance to update the Ubuntu package so the fix is available for everyone?

Revision history for this message
Vinícius Oliveira Godoy (vogodoy) wrote :

Hi there,
Any news?
Same problem here (Ubuntu 9.10, 64 bits, Brazil-portuguese).

Thanks!

Revision history for this message
The Octagon (the-octagon) wrote :

I'm having the same problem. I'm using Ubuntu 9.10. The installed version of PyRoom (installed via Synaptic) is 0.4.1, and I'm getting the error "AttributeError: 'list' object has no attribute 'lower'" on attempting to start PyRoom.

Revision history for this message
The Octagon (the-octagon) wrote :

python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('en_GB', 'UTF8')

Revision history for this message
Florian Heinle (tiax) wrote :

Hi,

this problem has been fixed long time ago in code / bzr trunk - the
problem is that we didn't have any release since. We're working on
sorting that out but there's some issues to be solved still
(http://blog.pyroom.org/2010/03/help-wanted-translations-management.html).

Cheers

Revision history for this message
August Karlstrom (fusionfile) wrote :

After one year and five months the latest version is still 0.4.1 and the bug is still there for the users. Is Pyroom a dead project?

Revision history for this message
Florian Heinle (tiax) wrote :

not really, there's just the problem with the translations and the corresponding "help wanted" that keeps us from releasing a new version

Revision history for this message
August Karlstrom (fusionfile) wrote :

I don't see why you need help with translations in order to push out a fix for a severe bug which makes Pyroom abort before launch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers