v = vte.Terminal() AttributeError: 'module' object has no attribute 'Terminal'

Discussion in 'Python' started by Steve, Dec 7, 2010.

  1. Steve

    Steve Guest

    Hi,

    I try to run a terminal emulation using Python+Gtk+Vte. Before develop
    my own sources, i'm testing some examples like this ;
    http://www.eurion.net/python-snippets/snippet/Embed a VTE terminal.html

    But when i try to run, i get this message error;

    v = vte.Terminal()
    AttributeError: 'module' object has no attribute 'Terminal'

    I'm using ubuntu 9.10 karmic. I've installed (apt-get) python-gtk, /2,
    -dev, libvte...

    Anyone know if there's a bug on this using karmic, or i must to
    download and compile gtk/vte from sources?

    thanks,

    Steve,
     
    Steve, Dec 7, 2010
    #1
    1. Advertising

  2. Steve

    Guest

    Re: v = vte.Terminal() AttributeError: 'module' object has noattribute 'Terminal'

    On 7 déc, 12:05, Steve <> wrote:
    > Hi,
    >
    > I try to run a terminal emulation using Python+Gtk+Vte. Before develop
    > my own sources, i'm testing some examples like this ;http://www.eurion.net/python-snippets/snippet/Embed a VTE termi...
    >
    > But when i try to run, i get this message error;
    >
    >     v = vte.Terminal()
    > AttributeError: 'module' object has no attribute 'Terminal'



    Before any other thing, make sure the "vte" module you imported is the
    expected one. Edit your script that way:


    # import vte
    try:
    import vte
    except:
    error = gtk.MessageDialog (None, gtk.DIALOG_MODAL,
    gtk.MESSAGE_ERROR, gtk.BUTTONS_OK,
    'You need to install python bindings for libvte')
    error.run()
    sys.exit (1)
    else:
    print "using wte module : %s" % vte


    and check the module path this prints to your stdout.
     
    , Dec 7, 2010
    #2
    1. Advertising

  3. Re: v = vte.Terminal() AttributeError: 'module' object has noattribute 'Terminal'

    Solved! A really dummy error: I've a vte.py file in the same folder,
    so import vte found this first than the needed!

    Thanks! (and sorry)

    Steve,

    On 7 Des, 17:34, ""
    <> wrote:
    > On 7 déc, 12:05, Steve <> wrote:
    >
    > > Hi,

    >
    > > I try to run a terminal emulation using Python+Gtk+Vte. Before develop
    > > my own sources, i'm testing some examples like this ;http://www.eurion.net/python-snippets/snippet/Embed a VTE termi...

    >
    > > But when i try to run, i get this message error;

    >
    > >     v = vte.Terminal()
    > > AttributeError: 'module' object has no attribute 'Terminal'

    >
    > Before any other thing, make sure the "vte" module you imported is the
    > expected one. Edit your script that way:
    >
    > # import vte
    > try:
    >     import vte
    > except:
    >     error = gtk.MessageDialog (None, gtk.DIALOG_MODAL,
    > gtk.MESSAGE_ERROR, gtk.BUTTONS_OK,
    >         'You need to install python bindings for libvte')
    >     error.run()
    >     sys.exit (1)
    > else:
    >     print "using wte module : %s" % vte
    >
    > and check the module path this prints to your stdout.
     
    edicionsdigitals.com edicions digitals xarxa socia, Dec 7, 2010
    #3
    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.

Share This Page