久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='FWjUY'></bdo><ul id='FWjUY'></ul>

    <small id='FWjUY'></small><noframes id='FWjUY'>

    1. <legend id='FWjUY'><style id='FWjUY'><dir id='FWjUY'><q id='FWjUY'></q></dir></style></legend>

      1. <i id='FWjUY'><tr id='FWjUY'><dt id='FWjUY'><q id='FWjUY'><span id='FWjUY'><b id='FWjUY'><form id='FWjUY'><ins id='FWjUY'></ins><ul id='FWjUY'></ul><sub id='FWjUY'></sub></form><legend id='FWjUY'></legend><bdo id='FWjUY'><pre id='FWjUY'><center id='FWjUY'></center></pre></bdo></b><th id='FWjUY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FWjUY'><tfoot id='FWjUY'></tfoot><dl id='FWjUY'><fieldset id='FWjUY'></fieldset></dl></div>
      2. <tfoot id='FWjUY'></tfoot>

        TypeError: object.__init__() 只接受一個參數(要初始化

        TypeError: object.__init__() takes exactly one argument (the instance to initialize)(TypeError: object.__init__() 只接受一個參數(要初始化的實例))

        1. <i id='ORE4K'><tr id='ORE4K'><dt id='ORE4K'><q id='ORE4K'><span id='ORE4K'><b id='ORE4K'><form id='ORE4K'><ins id='ORE4K'></ins><ul id='ORE4K'></ul><sub id='ORE4K'></sub></form><legend id='ORE4K'></legend><bdo id='ORE4K'><pre id='ORE4K'><center id='ORE4K'></center></pre></bdo></b><th id='ORE4K'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ORE4K'><tfoot id='ORE4K'></tfoot><dl id='ORE4K'><fieldset id='ORE4K'></fieldset></dl></div>
            <bdo id='ORE4K'></bdo><ul id='ORE4K'></ul>

            <small id='ORE4K'></small><noframes id='ORE4K'>

            <legend id='ORE4K'><style id='ORE4K'><dir id='ORE4K'><q id='ORE4K'></q></dir></style></legend>
              1. <tfoot id='ORE4K'></tfoot>
                    <tbody id='ORE4K'></tbody>

                  本文介紹了TypeError: object.__init__() 只接受一個參數(要初始化的實例)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試制作一個表單應用程序,但我不明白錯誤:

                  I am trying to make a form app and I don t understand the error:

                  TypeError: object.__init__() takes exactly one argument (the instance to initialize)
                  

                  代碼在這里;

                  class Myapp(App):
                      def build(self):
                          return Grid1()
                  
                  class Grid1(GridLayout):
                      def __init__(self,**kwargs):
                          super(Grid1,self).__init__(**kwargs)
                          self.cols=1
                  
                          self.inside=GridLayout()
                          self.inside.cols=2
                  
                          self.inside.add_widget(Label(text="Your name is :"))
                          self.name=TextInput(multiline=False)
                          self.inside.add_widget(self.name)
                  
                  
                          self.inside.add_widget(Label(text="Your Last name is :"))
                          self.lastname=TextInput(multiline=False)
                          self.inside.add_widget(self.lastname)
                  
                  
                          self.inside.add_widget(Label(text="Your email is :"))
                          self.email=TextInput(multiline=False)
                          self.inside.add_widget(self.email)
                  
                          self.submit=Button(text="Submit",font=40)
                          self.add_widget(self.submit)
                  
                  if __name__=="__main__":
                      Myapp().run()
                  

                  錯誤

                  File ".kivyprima.py", line 38, in <module> Myapp().run()
                  File "C:UsersAlexAppDataLocalProgramsPythonPython37libsite-packageskivyapp.py", line 829, in run root = self.build()
                  File ".kivyprima.py", line 10, in build return Grid1()
                  File ".kivyprima.py", line 34, in init self.submit=Button(text="Submit",font=40)
                  File "C:UsersAlexAppDataLocalProgramsPythonPython37libsite-packageskivyuixehaviorsutton.py", line 121, in init
                  

                  推薦答案

                  好的,所以錯誤實際上是 not 在你的 super(Grid1,self).__init__(**kwargs) 語句,它在 Submit 按鈕的創建中.你做到了:

                  OK, so the error is actually not in your super(Grid1,self).__init__(**kwargs) statement, it's in the creation of the Submit button. You did:

                  self.submit = Button(text="Submit", font=40)
                  self.add_widget(self.submit)
                  

                  但正如 docs 所說,字體大小是由 font_size 而不是 font 設置.代碼應該是:

                  But as the docs say, the font size is set by font_size and not font. The code should be:

                  self.submit = Button(text="Submit", font_size=40)
                  self.add_widget(self.submit)
                  

                  這應該可以正常工作.

                  只想感謝@chepner 指出這一點:

                  Just want to thank @chepner for pointing this out:

                  請注意,問題在于該字體無法被按鈕(或其他任何人),只是簡單地向上傳遞,直到它最終傳遞給 object.__init__ (這會引發錯誤簡單地忽略意想不到的論點).

                  Note that the issue, then, is that font, not being recognized by Button (or anyone else), is simply passed on up the chain until it is ultimately passed to object.__init__ (which raises an error instead of simply ignoring unexpected arguments).

                  這篇關于TypeError: object.__init__() 只接受一個參數(要初始化的實例)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                      • <bdo id='WUbbk'></bdo><ul id='WUbbk'></ul>

                        <tfoot id='WUbbk'></tfoot>
                      • <small id='WUbbk'></small><noframes id='WUbbk'>

                          <tbody id='WUbbk'></tbody>
                        • <legend id='WUbbk'><style id='WUbbk'><dir id='WUbbk'><q id='WUbbk'></q></dir></style></legend>
                          <i id='WUbbk'><tr id='WUbbk'><dt id='WUbbk'><q id='WUbbk'><span id='WUbbk'><b id='WUbbk'><form id='WUbbk'><ins id='WUbbk'></ins><ul id='WUbbk'></ul><sub id='WUbbk'></sub></form><legend id='WUbbk'></legend><bdo id='WUbbk'><pre id='WUbbk'><center id='WUbbk'></center></pre></bdo></b><th id='WUbbk'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WUbbk'><tfoot id='WUbbk'></tfoot><dl id='WUbbk'><fieldset id='WUbbk'></fieldset></dl></div>

                          1. 主站蜘蛛池模板: 日韩欧美自拍 | 国产成人精品av在线观 | www亚洲精品 | 欧美成人精品一区二区三区 | 99香蕉视频 | 狠狠干综合| 天天插天天插 | 黄网在线免费观看 | 在线观看国产免费视频 | 日韩精品一区二区三区免费视频 | 免费在线观看黄色片 | 亚洲高清在线播放 | 国产精品福利一区 | 成人午夜又粗又硬又大 | 亚洲精品久久久 | 天天做天天干 | 日韩在线观看一区 | 亚洲午夜一区 | 欧美一级片免费观看 | 免费三级网站 | 在线视频一区二区 | 中文字幕在线观看网站 | 久久国产欧美 | 男女啪啪免费 | 国产精品第一 | 国产精品海角社区 | 国产精品一区三区 | 欧美精品在线观看视频 | 日韩三级一区 | 黄色国产在线观看 | 日韩欧美自拍 | 在线观看h片 | 色综合久久久久 | 久久久久亚洲 | 亚洲免费视频网站 | 国内外成人免费视频 | 欧美一级片在线 | 国产精品久久久久久99 | 97青青草| 3d动漫精品h区xxxxx区 | 色妞综合网 |