Crashes on startup

Bug #365477 reported by Børre Gaup on 2009-04-23
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Getting Things GNOME!
Medium
Bertrand Rousseau
PyRoom
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

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

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

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

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 ;)

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

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

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

Thanks

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')

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.

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

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

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

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
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
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 :)

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
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

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?

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

Thanks!

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.

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')

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

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?

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

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  Edit
Everyone can see this information.

Other bug subscribers