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

            How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

            Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?