Abhinav Goel
Abhinav Goel

Reputation: 421

GUI with Python, Tkinter and AppJar

I am facing errors while running GUI code on python. I am using a mac. The same code runs perfectly on other computers.

This basic function call gives me this error. Can someone please help?

    >>> from appJar import gui
    >>> app = gui()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/appJar/appjar.py", line 410, in __init__
        self.exe_file = os.path.basename(theMain.__file__)
    AttributeError: module '__main__' has no attribute '__file__'

Upvotes: 0

Views: 1164

Answers (2)

Hans van der Waal
Hans van der Waal

Reputation: 1

I downloaded and set the path in Windows but it did not work.

But a few lines of code solved similar problems I had

import sys
sys.path.append("C:\Program Files\Python36\Lib")

The sys.path of course you have to adapt to your settings.

I did a couple of things with it. It is a marvel.

Upvotes: 0

SuchGuestManyWow
SuchGuestManyWow

Reputation: 11

The '>>>' at the start of the lines indicates you are using the shell. This is probably why it is not working. While in the window you were using here, go file->new and write it in there. Should be fine.

Upvotes: 1

Related Questions