AttributeError: 'NoneType' object has no attribute 'config' when trying to change a button attribute's font size [duplicate]Tkinter: AttributeError: NoneType object has no attribute getTkinter: AttributeError: NoneType object has no attribute getAttributeError: 'module' object has no attributeHow to change the font size on a matplotlib plotMeaning of “AttributeError: NoneType object has no attribute tk”?ttk tkinter multiple frames/windowsPython AttributeError: 'NoneType' object has no attribute 'get'AttributeError: 'NoneType' object has no attribute 'grid_remove'AttributeError: 'NoneType' object has no attribute 'config'Tkinter - relation between font type and widthWhy are my buttons and frame in Python Tkinter not arranging in the proper geometric coordinates despite giving the right dimensions

Why was this character made Grand Maester?

Parallel fifths in the orchestra

How did NASA Langley end up with the first 737?

Can I tell a prospective employee that everyone in the team is leaving?

Manager questioning my time estimates for a project

Grade-school elementary algebra presented in an abstract-algebra style?

Are black holes spherical during merger?

Where is Jon going?

How to deal with a colleague who is being aggressive?

Do photons bend spacetime or not?

What weight should be given to writers groups critiques?

Why did Drogon spare this character?

Why didn't Thanos use the Time Stone to stop the Avengers' plan?

What Armor Optimization applies to a Mithral full plate?

How to cut a climbing rope?

Function argument returning void or non-void type

Dealing with spaghetti codebase, manager asks for things I can't deliver

Should there be an "a" before "ten years imprisonment"?

Is superuser the same as root?

Are runways booked by airlines to land their planes?

The art of clickbait captions

Public transport tickets in UK for two weeks

Making a electromagnet

What is the use case for non-breathable waterproof pants?



AttributeError: 'NoneType' object has no attribute 'config' when trying to change a button attribute's font size [duplicate]


Tkinter: AttributeError: NoneType object has no attribute getTkinter: AttributeError: NoneType object has no attribute getAttributeError: 'module' object has no attributeHow to change the font size on a matplotlib plotMeaning of “AttributeError: NoneType object has no attribute tk”?ttk tkinter multiple frames/windowsPython AttributeError: 'NoneType' object has no attribute 'get'AttributeError: 'NoneType' object has no attribute 'grid_remove'AttributeError: 'NoneType' object has no attribute 'config'Tkinter - relation between font type and widthWhy are my buttons and frame in Python Tkinter not arranging in the proper geometric coordinates despite giving the right dimensions






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0
















This question already has an answer here:



  • Tkinter: AttributeError: NoneType object has no attribute get

    2 answers



When trying to use the .config() method to change the font size of the 'button1' attribute of the 'studentmainmenuscreen' object I got this error:
Error



I can't figure out why this error is occurring! Please help me?!



class standardclass: #creates the class called 'standardclass'
def __init__(self, labeltext, b1t, b1c, b2t, b2c, tlxc, b1x, b1y, b2x, b2y): #creates the initalization subroutine and passes the parameters in the bracket
self.canvas = Canvas(root, width=600, height=600, highlightthickness=0, bg='#A9E2f3') #creates the canvas attribute
self.canvas.pack() #packs the canvas inside of the root window
self.titlelabel = Label(self.canvas, text=labeltext, font=('Arial', 30), bg='#A9E2f3').place(x=tlxc,y=20) #creates the title label attribute
self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y) #creates the bottom left button attribute
self.button2 = Button(self.canvas, text=b2t, command=b2c, font=('Arial', 30), relief='flat').place(x=b2x,y=b2y) #creates the bottom right button attribute

studentmainmenuscreen = standardclass('Main Menu', 'Maths Tests', temporarysubroutine, 'Logout', temporarysubroutine, 225, 200, 300, 200, 400)
studentmainmenuscreen.button1.config(font=('Arial', 20))
studentmainmenuscreen.button1.update()









share|improve this question















marked as duplicate by Bryan Oakley python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 24 at 3:30


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • You are assigning the button to the value returned by place()

    – Johnny Mopp
    Mar 24 at 1:07

















0
















This question already has an answer here:



  • Tkinter: AttributeError: NoneType object has no attribute get

    2 answers



When trying to use the .config() method to change the font size of the 'button1' attribute of the 'studentmainmenuscreen' object I got this error:
Error



I can't figure out why this error is occurring! Please help me?!



class standardclass: #creates the class called 'standardclass'
def __init__(self, labeltext, b1t, b1c, b2t, b2c, tlxc, b1x, b1y, b2x, b2y): #creates the initalization subroutine and passes the parameters in the bracket
self.canvas = Canvas(root, width=600, height=600, highlightthickness=0, bg='#A9E2f3') #creates the canvas attribute
self.canvas.pack() #packs the canvas inside of the root window
self.titlelabel = Label(self.canvas, text=labeltext, font=('Arial', 30), bg='#A9E2f3').place(x=tlxc,y=20) #creates the title label attribute
self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y) #creates the bottom left button attribute
self.button2 = Button(self.canvas, text=b2t, command=b2c, font=('Arial', 30), relief='flat').place(x=b2x,y=b2y) #creates the bottom right button attribute

studentmainmenuscreen = standardclass('Main Menu', 'Maths Tests', temporarysubroutine, 'Logout', temporarysubroutine, 225, 200, 300, 200, 400)
studentmainmenuscreen.button1.config(font=('Arial', 20))
studentmainmenuscreen.button1.update()









share|improve this question















marked as duplicate by Bryan Oakley python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 24 at 3:30


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • You are assigning the button to the value returned by place()

    – Johnny Mopp
    Mar 24 at 1:07













0












0








0









This question already has an answer here:



  • Tkinter: AttributeError: NoneType object has no attribute get

    2 answers



When trying to use the .config() method to change the font size of the 'button1' attribute of the 'studentmainmenuscreen' object I got this error:
Error



I can't figure out why this error is occurring! Please help me?!



class standardclass: #creates the class called 'standardclass'
def __init__(self, labeltext, b1t, b1c, b2t, b2c, tlxc, b1x, b1y, b2x, b2y): #creates the initalization subroutine and passes the parameters in the bracket
self.canvas = Canvas(root, width=600, height=600, highlightthickness=0, bg='#A9E2f3') #creates the canvas attribute
self.canvas.pack() #packs the canvas inside of the root window
self.titlelabel = Label(self.canvas, text=labeltext, font=('Arial', 30), bg='#A9E2f3').place(x=tlxc,y=20) #creates the title label attribute
self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y) #creates the bottom left button attribute
self.button2 = Button(self.canvas, text=b2t, command=b2c, font=('Arial', 30), relief='flat').place(x=b2x,y=b2y) #creates the bottom right button attribute

studentmainmenuscreen = standardclass('Main Menu', 'Maths Tests', temporarysubroutine, 'Logout', temporarysubroutine, 225, 200, 300, 200, 400)
studentmainmenuscreen.button1.config(font=('Arial', 20))
studentmainmenuscreen.button1.update()









share|improve this question

















This question already has an answer here:



  • Tkinter: AttributeError: NoneType object has no attribute get

    2 answers



When trying to use the .config() method to change the font size of the 'button1' attribute of the 'studentmainmenuscreen' object I got this error:
Error



I can't figure out why this error is occurring! Please help me?!



class standardclass: #creates the class called 'standardclass'
def __init__(self, labeltext, b1t, b1c, b2t, b2c, tlxc, b1x, b1y, b2x, b2y): #creates the initalization subroutine and passes the parameters in the bracket
self.canvas = Canvas(root, width=600, height=600, highlightthickness=0, bg='#A9E2f3') #creates the canvas attribute
self.canvas.pack() #packs the canvas inside of the root window
self.titlelabel = Label(self.canvas, text=labeltext, font=('Arial', 30), bg='#A9E2f3').place(x=tlxc,y=20) #creates the title label attribute
self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y) #creates the bottom left button attribute
self.button2 = Button(self.canvas, text=b2t, command=b2c, font=('Arial', 30), relief='flat').place(x=b2x,y=b2y) #creates the bottom right button attribute

studentmainmenuscreen = standardclass('Main Menu', 'Maths Tests', temporarysubroutine, 'Logout', temporarysubroutine, 225, 200, 300, 200, 400)
studentmainmenuscreen.button1.config(font=('Arial', 20))
studentmainmenuscreen.button1.update()




This question already has an answer here:



  • Tkinter: AttributeError: NoneType object has no attribute get

    2 answers







python tkinter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 at 0:06









Cody Gray

197k36389479




197k36389479










asked Mar 24 at 0:57









TomTom

414112




414112




marked as duplicate by Bryan Oakley python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 24 at 3:30


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Bryan Oakley python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 24 at 3:30


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • You are assigning the button to the value returned by place()

    – Johnny Mopp
    Mar 24 at 1:07

















  • You are assigning the button to the value returned by place()

    – Johnny Mopp
    Mar 24 at 1:07
















You are assigning the button to the value returned by place()

– Johnny Mopp
Mar 24 at 1:07





You are assigning the button to the value returned by place()

– Johnny Mopp
Mar 24 at 1:07












1 Answer
1






active

oldest

votes


















0














You're changing the type of object in line:



self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y)


For both buttons.



You can create the button first, then call the place() methods:



self.button1 = Button(params)
self.button2 = Button(params)
self.button1.place(params)
self.button2.place(params)


Here is a good article to refer to.






share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You're changing the type of object in line:



    self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y)


    For both buttons.



    You can create the button first, then call the place() methods:



    self.button1 = Button(params)
    self.button2 = Button(params)
    self.button1.place(params)
    self.button2.place(params)


    Here is a good article to refer to.






    share|improve this answer



























      0














      You're changing the type of object in line:



      self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y)


      For both buttons.



      You can create the button first, then call the place() methods:



      self.button1 = Button(params)
      self.button2 = Button(params)
      self.button1.place(params)
      self.button2.place(params)


      Here is a good article to refer to.






      share|improve this answer

























        0












        0








        0







        You're changing the type of object in line:



        self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y)


        For both buttons.



        You can create the button first, then call the place() methods:



        self.button1 = Button(params)
        self.button2 = Button(params)
        self.button1.place(params)
        self.button2.place(params)


        Here is a good article to refer to.






        share|improve this answer













        You're changing the type of object in line:



        self.button1 = Button(self.canvas, text=b1t, command=b1c, font=('Arial', 30), relief='flat').place(x=b1x,y=b1y)


        For both buttons.



        You can create the button first, then call the place() methods:



        self.button1 = Button(params)
        self.button2 = Button(params)
        self.button1.place(params)
        self.button2.place(params)


        Here is a good article to refer to.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 24 at 1:31









        GKEGKE

        609518




        609518















            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript