Python Forum
ImportError: cannot import name 'gui' from 'appJar'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ImportError: cannot import name 'gui' from 'appJar'
#1
I want to use appJar for some simple GUI, but the import function doesn't work. Does anyone know how I can fix it?
The code is taken from "http://appjar.info/pythonWidgetLayout/".
from appJar import gui  

def changeLabel(btn):  
    app.setLabel("l2", app.getEntry("text"))  

app = gui()  
app.addLabel("l1", "Simple Demo")
app.addEntry("text")
app.addButton("OK", changeLabel)
app.addEmptyLabel("l2")
app.go()
Reply
#2
Typically, such errors could happen if you create yourself a file named appJar.py on the python path that shadows the actual appJar module. What is the result of
import appJar
print(appJar)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Cannot import easysnmp: ImportError: libnetsnmp.so.30 Calab 4 1,000 Jun-08-2023, 08:52 PM
Last Post: Gribouillis
  ImportError: cannot import name 'Pyfhel' from 'Pyfhel' Anldra12 9 3,448 Dec-13-2021, 06:55 PM
Last Post: Anldra12
  ImportError: cannot import name 'get_config' russray2008 0 4,681 Sep-20-2021, 02:18 PM
Last Post: russray2008
  ImportError: cannot import name 'Union' from '_ctypes' (unknown location) ciuffoly 15 10,265 Oct-09-2020, 06:58 AM
Last Post: ciuffoly
  ImportError: cannot import name 'Request' from 'request' abhishek81py 1 3,862 Jun-18-2020, 08:07 AM
Last Post: buran
  ImportError: cannot import name 'MidiEvaluator' from 'parser' (Windows 10) spiffspaceman 4 2,632 May-22-2020, 10:16 PM
Last Post: snippsat
  ImportError: cannot import name 'X ' from ' Y' (Unknown location) Arjunpi 1 4,320 Apr-30-2020, 12:56 AM
Last Post: Larz60+
  problem with mapnik in anaconda python 2: from _mapnik import * ImportError: DLL load parsley 0 1,875 Dec-11-2019, 07:50 AM
Last Post: parsley
  getting ImportError: cannot import name 'HAProxyServer' deepakkr3110 0 1,620 Nov-12-2019, 07:48 AM
Last Post: deepakkr3110
  ImportError: cannot import name 'path' user123 2 12,382 Jul-14-2019, 10:08 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020