Program crashes on startup

Bug #367990 reported by Børre Gaup on 2009-04-27
126
This bug affects 19 people
Affects Status Importance Assigned to Milestone
PyRoom
Medium
Florian Heinle
0.4
Medium
Florian Heinle
pyroom (Debian)
Fix Released
Unknown
pyroom (Ubuntu)
Medium
Unassigned
Lucid
Medium
Unassigned

Bug Description

PyRoom crashes on startup.

The bug is fixed in maverick as the patch was applied in debian and the packaged synced from there.

TEST CASE:
1) install pyroom
2) start if from the command line ans see it crash:
pyroom-0.4.1 $ LC_ALL=C ./pyroom
Traceback (most recent call last):
  File "./pyroom", line 35, in <module>
    import sys, PyRoom.cmdline
  File "/home/boerre/Dokumenter/src/pyroom-0.4.1/PyRoom/__init__.py", line 34, 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'

3) install package from lucid-proposed
4) start it to verify that it works

Related branches

Florian Heinle (tiax) wrote :

Hi,

thanks for your report. Has been fixed in trunk and 0.4

Changed in pyroom:
assignee: nobody → tiax
importance: Undecided → Medium
status: New → Fix Committed
affects: ubuntu → pyroom (Ubuntu)
Vladimir (dreadatour) on 2009-10-29
Changed in pyroom:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Vladimir (dreadatour) wrote :

Sorry... It was a pure accident with status change.

kernel_script (kernelscript) wrote :

I got the exact same error on my updated Ubuntu Karmic Koala 9.10

aslam karachiwala (akwala) wrote :

Ubuntu 9.10 amd64
PyRoom 0.4.1-1

This problem persists.

massula (mmassula) wrote :

Yep. I have the same problem of Aslam.

Ubuntu 9.10 amd64
PyRoom 0.4.1

Same error.
PyRoom 0.4.1
Ubuntu 9.10

Error occurred after changing desktop language from en-us to hungarian and persisted even after switching back to en-us.

Don't know it it was a good idea but I managed to get rid of it by setting a $LANGUAGE from en_US.UTF-8 to nothing.

Tarnay Kálmán (tarnay-kalman) wrote :

I have just experienced this in Lucid beta.
I installed from Ubuntu's repositories.

Changed in pyroom (Ubuntu):
status: New → Confirmed
Daniel Kessler (hornord) wrote :

Bug reproduced on fresh install of Xubuntu Lucid 10.04

Here's the output:
---
Traceback (most recent call last):
  File "/usr/bin/pyroom", line 35, in <module>
    import sys, PyRoom.cmdline
  File "/usr/lib/python2.6/dist-packages/PyRoom/__init__.py", line 34, 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'
---

Since this seems related to the locale, here's the output of `locale` attached (swiss french in my case).

This bug is not fixed in 0.4, unless 0.4.1 contains a regression. I have 0.4.1 and am affected by this bug.

Thanks to Csomortáni Hunor.

This worked for me. You can easily workaround this bug by starting pyroom the following way:

From a Terminal:
LANGUAGE='' pyroom &

In Gnome via ALT+F2 you type in:
sh -c "LANGUAGE='' pyroom"

And all your pyroom menu entries change to:
sh -c "LANGUAGE='' pyroom"

Worked like a charm. Please note, that after LANGUAGE= there are two ' not a single ", just do copy&paste. :)

$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANGUAGE="de_DE:de:en"
LANG="de_DE.UTF-8"
DISPLAY=":0.0"
MANWIDTH="80"
__GL_SYNC_TO_VBLANK="1"

I guess this really depends on the LANGUAGE-variable. What's the difference between LANG and LANGUAGE? I can't remember, but one of them I added in the /etc/environment

To stick with the original menu entry its:

sh -c "LANGUAGE='' pyroom %F"

Slackware 13.1 64 bits and pyroom-0.4.1

$ env | grep LANGUAGE
LANGUAGE=es_ES

$ python --version
Python 2.6.4

# Debugging a bit in /usr/lib64/python2.6/site-packages/PyRoom/__init__.py
>>> print languages_used
['es_ES', ['es_ES']]
# Ooops not a plain list

Patch attached.

Slackware 13.1 64 bits and pyroom-0.4.1

$ env | grep LANGUAGE
LANGUAGE=es_ES

$ python --version
Python 2.6.4

# Debugging a bit in /usr/lib64/python2.6/site-packages/PyRoom/__init__.py
>>> print languages_used
['es_ES', ['es_ES']]
# Ooops not a plain list

Patch attached.

Yalçın Can (yalcin.can) wrote :

I have the same problem, I'm using Ubuntu Lucid.

Could you try using the trunk version of pyroom? We have made some changes
recently to the locale handling that may have fixed this.

bzr branch lp:pyroom
cd pyroom
./pyroom

On 30 August 2010 09:05, Yalçın Can <email address hidden> wrote:

> I have the same problem, I'm using Ubuntu Lucid.
>
> --
> Program crashes on startup
> https://bugs.launchpad.net/bugs/367990
> You received this bug notification because you are a member of PyRoom
> Bug Squad, which is subscribed to PyRoom.
>

Florian Heinle (tiax) wrote :

it's fixed in trunk for quite a while now, however we haven't made any release since then.

The current translations situation is blocking new releases for now. C.f. http://blog.pyroom.org/2010/03/help-wanted-translations-management.html

tags: added: patch
Philip Muškovac (yofel) wrote :

Fixed in maverick:

pyroom (0.4.1-4) unstable; urgency=low

  * debian/patches:
    + Added patch to fix crash when LANGUAGE is set. Thanks to Jakub Wilk
      <email address hidden> for patch (Closes: #584478)

 -- Kartik Mistry <email address hidden> Fri, 04 Jun 2010 09:16:07 +0530

Changed in pyroom (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Fix Released
Philip Muškovac (yofel) wrote :

Fix in lp:pyroom is different from the patch.

tags: added: patch-rejected-upstream
removed: patch
Philip Muškovac (yofel) on 2010-09-02
description: updated
Philip Muškovac (yofel) wrote :

Filed a merge request for a lucid SRU.

Stefano Rivera (stefanor) wrote :

Uploaded and pending review by ubuntu-sru.

(Subscribed ubuntu-release by accident, sorry)

Changed in pyroom (Ubuntu Lucid):
status: New → Fix Committed
importance: Undecided → Medium

Accepted pyroom into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Philip Muškovac (yofel) wrote :

Works fine for me with the package from lucid-proposed.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pyroom - 0.4.1-2ubuntu0.1

---------------
pyroom (0.4.1-2ubuntu0.1) lucid-proposed; urgency=low

  * debian/patches:
    + Added patch to fix crash when LANGUAGE is set. Thanks to Jakub Wilk
      <email address hidden> for patch (LP: #367990)
 -- Philip Muskovac <email address hidden> Sun, 05 Sep 2010 22:18:59 +0200

Changed in pyroom (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in pyroom (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.