AttributeError: 'NoneType' object has no attribute 'get'

Kushal Kumaran kushal at locationd.net
Thu Jan 6 13:02:59 EST 2022


On Tue, Jan 04 2022 at 11:34:20 PM, NArshad <narshad.380 at gmail.com> wrote:
> How to correct what is written below:
>
> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "C:\Users\Dani Brothers\Anaconda3\lib\tkinter\__init__.py", line 1705, in __call__
>     return self.func(*args)
>   File "D:/Python/Book Bank/New folder/PyCharm/Final/Excel.py", line 57, in SaveBook
>     e_pissue.get(),
> AttributeError: 'NoneType' object has no attribute 'get'
>
> Process finished with exit code 0

The error means that e_pissue is None, so your code cannot call the get
method on it.  You need to fix the code so that e_pissue is not None and
is instead referring to an object that has a suitable get method.

Without looking at the rest of your code, it is not possible to get any
more specific.  Looking at the path of the file, it looks like you may
be following some programming exercises from a book.  If so, perhaps you
need to look up the section about understanding exception tracebacks.

-- 
regards,
kushal


More information about the Python-list mailing list