Help needed with gettext.install

Discussion in 'Python' started by Eric Martel, Mar 5, 2004.

  1. Eric Martel

    Eric Martel Guest

    Hi,

    I'm using Mandrake Cooker and just upgraded Python to 2.3.3.

    A Python-based program I use often is Pybliographer; since the Python
    update, I get the following error when trying to start Pybliographer:

    Traceback (most recent call last):
    File "/usr/bin/pybliographer", line 40, in ?
    gettext.install (progname, localedir, unicode = True)
    AttributeError: 'module' object has no attribute 'install'

    I don't know much about Python, but here is a Python session from the
    shell (for which I was inspired by something I found on Google):

    Python 2.3.3 (#2, Feb 17 2004, 11:45:40)
    [GCC 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gettext
    >>> gettext.__dict__['textdomain']

    <function textdomain at 0x403f7cdc>
    >>> gettext.__dict__['install']

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    KeyError: 'install'

    So it really looks like the 'install' method is not available for the
    object 'gettext', while the method 'textdomain' is. I talked about it on
    a Cooker list, but no one was aware of what could cause this problem
    (and I was apparently the only one to experience it), so I'm asking to
    you guys: do you know what could be missing/wrong on my system to cause
    such an error?

    Thank you!

    --
    Eric Martel
    Sainte-Foy (Québec)
    Canada
    Clef publique OpenPGP: ED3F191C (http://key.ericmartel.net/)

    Copyleft 2004 Eric Martel
    (http://www.gnu.org/copyleft/)

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.2 (GNU/Linux)
    Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

    iD8DBQFASKg68B7YqO0/GRwRApjyAJsEgRL5v4GvmhgqHJ7Ksrt0zrgdZACdGRiZ
    E7yjRnm4LkqQ1RnOeZzW1vw=
    =nBnL
    -----END PGP SIGNATURE-----
    Eric Martel, Mar 5, 2004
    #1
    1. Advertising

  2. Eric Martel

    Eric Martel Guest

    Re: Help needed with gettext.install (solved)

    Eric Martel wrote:
    >
    > Hi,
    >
    > I'm using Mandrake Cooker and just upgraded Python to 2.3.3.
    >
    > A Python-based program I use often is Pybliographer; since the Python
    > update, I get the following error when trying to start Pybliographer:
    >
    > Traceback (most recent call last):
    > File "/usr/bin/pybliographer", line 40, in ?
    > gettext.install (progname, localedir, unicode = True)
    > AttributeError: 'module' object has no attribute 'install'
    >
    > I don't know much about Python, but here is a Python session from the
    > shell (for which I was inspired by something I found on Google):
    >
    > Python 2.3.3 (#2, Feb 17 2004, 11:45:40)
    > [GCC 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)] on linux2
    > Type "help", "copyright", "credits" or "license" for more information.
    > >>> import gettext
    > >>> gettext.__dict__['textdomain']

    > <function textdomain at 0x403f7cdc>
    > >>> gettext.__dict__['install']

    > Traceback (most recent call last):
    > File "<stdin>", line 1, in ?
    > KeyError: 'install'
    >
    > So it really looks like the 'install' method is not available for the
    > object 'gettext', while the method 'textdomain' is. I talked about it on
    > a Cooker list, but no one was aware of what could cause this problem
    > (and I was apparently the only one to experience it), so I'm asking to
    > you guys: do you know what could be missing/wrong on my system to cause
    > such an error?


    I found out that the problem was with the new gettext.py file that was
    installed with the Cooker update I did: for a reason I don't know, the
    file was very different from the one found inside the official Python
    2.3.3 sources: I just copied the latter onto the bad one and everything
    was fine. I alerted the Cooker community.

    --
    Eric Martel
    Sainte-Foy (Québec)
    Canada
    Clef publique OpenPGP: ED3F191C (http://key.ericmartel.net/)

    Copyleft 2004 Eric Martel
    (http://www.gnu.org/copyleft/)

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.2 (GNU/Linux)
    Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

    iD8DBQFASMSv8B7YqO0/GRwRAuKaAJ9CLeAMQvWlA6Wc/30TNHOZ3bTSGgCdG+nl
    af5j4h31TdCArPCsfvG9Y4k=
    =SYzA
    -----END PGP SIGNATURE-----
    Eric Martel, Mar 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Leidert
    Replies:
    0
    Views:
    675
    Daniel Leidert
    May 28, 2005
  2. tiewknvc9
    Replies:
    2
    Views:
    845
    tiewknvc9
    Jan 18, 2006
  3. Herbert Straub

    Error, if compiled with -O3 (gettext)

    Herbert Straub, Jun 2, 2004, in forum: C++
    Replies:
    2
    Views:
    369
    Herbert Straub
    Jun 2, 2004
  4. Timo Benk

    OT: gettext with multiple textdomains

    Timo Benk, Sep 27, 2003, in forum: C Programming
    Replies:
    1
    Views:
    381
    Mike Wahler
    Sep 27, 2003
  5. tobleron
    Replies:
    27
    Views:
    1,673
    Daniel Pitts
    Oct 4, 2008
Loading...

Share This Page