After migrating from debian to ubuntu, tkinter "hello world" doesn't work

Discussion in 'Python' started by mortuno@gmail.com, Nov 28, 2005.

  1. Guest

    Hi

    My tkinter apps worked fine in debian linux (woody and sarge)
    I moved to ubuntu 5.10

    I follow the 'hello world' test as seen in
    http://wiki.python.org/moin/TkInter


    import _tkinter # with underscore, and lowercase 't'
    import Tkinter # no underscore, uppercase 'T'
    Tkinter._test() # note underscore in _test()

    and at the third point I get:

    File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1569, in __init__
    self.tk = _tkinter.create(screenName, baseName, className,
    interactive, wantobjects, useTk, sync, use)
    _tkinter.TclError: this isn't a Tk applicationi


    Some posts relate this error to locales, but I didn't change them

    locale.getlocale()
    ('es_ES', 'iso-8859-15')

    any help will be appreciated

    Miguel
     
    , Nov 28, 2005
    #1
    1. Advertising

  2. Mandus Guest

    28 Nov 2005 11:02:57 -0800 skrev :
    > Hi
    >
    > My tkinter apps worked fine in debian linux (woody and sarge)
    > I moved to ubuntu 5.10
    >
    > I follow the 'hello world' test as seen in
    > http://wiki.python.org/moin/TkInter
    >
    >
    > import _tkinter # with underscore, and lowercase 't'
    > import Tkinter # no underscore, uppercase 'T'
    > Tkinter._test() # note underscore in _test()


    works just fine on my ubunty 5.10. Make sure you have the python2.4-tk
    package installed (sudo apt-get install python2.4-tk).


    --
    Mandus - the only mandus around.
     
    Mandus, Nov 29, 2005
    #2
    1. Advertising

  3. Guest

    Mandus ha escrito:

    > works just fine on my ubunty 5.10. Make sure you have the python2.4-tk
    > package installed (sudo apt-get install python2.4-tk).
    >


    yes, i got it.
    It's a fresh instalation from a cd in a brand new laptop. I tried to
    reinstall python2.4-tk and many other packeges :-(

    There are two errors
    _tkinter.TclError: this isn't a Tk application
    invalid color name "#efebe7 "

    It is a tk problem. amsn (also based on tk) displays the same error.
    Somebody in a post said that
    aptitude install xrgb
    solved it, but it didn't work for me.

    It seems to be a problem of X window.
    In a debian box, it works fine. But if I export the display to the
    ubuntu
    one, get same error. (Other apps export fine)
    And even running it in the debian box, with a vnc display in the
    ubuntu,
    same error! :-((


    >
    > --
    > Mandus - the only mandus around.
     
    , Nov 30, 2005
    #3
  4. wrote:
    > Hi
    >
    > My tkinter apps worked fine in debian linux (woody and sarge)
    > I moved to ubuntu 5.10
    >
    > I follow the 'hello world' test as seen in
    > http://wiki.python.org/moin/TkInter
    >


    Ubuntu uses X.org. Did your Debian distro use xfree86?
     
    Wade Leftwich, Nov 30, 2005
    #4
  5. Mandus Guest

    30 Nov 2005 04:23:37 -0800 skrev :
    >
    > Mandus ha escrito:
    >
    >> works just fine on my ubunty 5.10. Make sure you have the python2.4-tk
    >> package installed (sudo apt-get install python2.4-tk).
    >>

    >
    > yes, i got it.
    > It's a fresh instalation from a cd in a brand new laptop. I tried to
    > reinstall python2.4-tk and many other packeges :-(
    >


    If you think it may help, I can drop you my complete
    'dpkg --get-selections'. Just tell me where you want it.

    mvh,
    --
    Mandus - the only mandus around.
     
    Mandus, Nov 30, 2005
    #5
  6. Guest

    yes, but everybody using ubuntu tells me it works fine for them.
    The problem must be something very specific to my laptop and
    x window.
    I am using need "855resolution" , I'd like to know if it works for
    somedy else with ubuntu and 855resolution.

    thanks for your interest
     
    , Dec 1, 2005
    #6
  7. Guest

    thank you very much, but now I don't think it is a problem of
    dependencies
     
    , Dec 1, 2005
    #7
    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. vijay
    Replies:
    8
    Views:
    724
  2. Roy
    Replies:
    6
    Views:
    635
    Roedy Green
    Jan 7, 2008
  3. SPE - Stani's Python Editor
    Replies:
    1
    Views:
    462
    SPE - Stani's Python Editor
    Apr 29, 2008
  4. Luke Kenneth Casson Leighton
    Replies:
    0
    Views:
    483
    Luke Kenneth Casson Leighton
    Dec 31, 2008
  5. Larry
    Replies:
    27
    Views:
    435
    Michele Dondi
    Jan 25, 2005
Loading...

Share This Page