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

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

        <bdo id='7iqzS'></bdo><ul id='7iqzS'></ul>

        <small id='7iqzS'></small><noframes id='7iqzS'>

        Python/Kivy AttributeError:“超級(jí)"對(duì)象沒(méi)有屬性“

        Python/Kivy AttributeError: #39;super#39; object has no attribute #39;__getattr__#39;(Python/Kivy AttributeError:“超級(jí)對(duì)象沒(méi)有屬性“__getattr__)
        • <small id='PlKm3'></small><noframes id='PlKm3'>

            <tbody id='PlKm3'></tbody>
            <tfoot id='PlKm3'></tfoot>

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

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

                  本文介紹了Python/Kivy AttributeError:“超級(jí)"對(duì)象沒(méi)有屬性“__getattr__"的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我無(wú)法重新加載用戶的圖片或個(gè)人資料.我要重新加載的小部件包含在 ScreenOne 中,我在此類中創(chuàng)建了用于重新加載的函數(shù),并嘗試從 Change 類中的函數(shù)中調(diào)用它.

                  I am having trouble to reload picture or profile of user. The widget that I want to reload is included in the ScreenOne, I create the function for reloading in this class and try to call it from the function in the class Change.

                  提前謝謝你!

                  這是我的 main.py:

                  Here is my main.py:

                  from kivy.app import App
                  from kivy.uix.boxlayout import BoxLayout
                  from kivy.uix.image import Image
                  import readtable
                  import Readpictureadress
                  import sizetable
                  import Match
                  import nbofpictures
                  import random
                  from kivy.uix.screenmanager import ScreenManager, Screen, NoTransition
                  from kivy.properties import ObjectProperty, NumericProperty, StringProperty
                  import kivy
                  
                  
                  size = sizetable.main()
                  Iduserp = (random.randint(1, size))
                  imagenb=0
                  picadress= Readpictureadress.main(Iduserp, 0)
                  
                  class Manager(ScreenManager):
                  
                      screen_one = ObjectProperty(None)
                      screen_two = ObjectProperty(None)
                  
                  class ScreenTwo(Screen):
                      print('screentwo')
                      pass
                  
                  class ScreenOne(Screen):
                      img = StringProperty()
                      global picadress
                      global Iduserp
                  
                  
                      def __init__(self, **kwargs):
                          super(ScreenOne, self).__init__(**kwargs)
                          self.img = picadress
                  
                  
                      def displayScreenThenLeave(self):
                          print('Displayscreen')
                  
                          self.changeScreen()
                  
                      def changeScreen(self):
                          print('changescreen')
                  
                          if self.Manager.current == 'screen1':
                              self.Manager.current = 'screen2'
                          else:
                              self.Manager.current = 'screen1'
                      pass
                  
                      def reloadprofile(self):
                          self.img = picadress
                          self.ids.a1.reload()
                  
                  
                  class Change():
                      global Iduserp
                      global imagenb
                      global picadress
                  
                      def changeuser(self):
                  
                          size = sizetable.main()
                          Iduserp = (random.randint(1, size))
                          app = App.get_running_app()
                          app.screenone.reloadprofile()
                  
                      def changepicturenb (self):
                  
                          nbofpic = nbofpictures.main(Iduserp)
                          if imagenb < nbofpic:
                              imagenb += 1
                          else:
                              imagenb = 0
                          app = App.get_running_app()
                          app.screenone.reloadprofile()
                  
                  class ScreensApp(App):
                      print('ScreensApp')
                      screenone=ScreenOne()
                      varChange= Change()
                      def build(self):
                          m = Manager(transition=NoTransition())
                          return m
                  
                  if __name__ == "__main__":
                      ScreensApp().run()
                  

                  我的 kivy 文件:

                  My kivy file:

                  #:kivy 1.8.0
                  
                  <ScreenTwo>:
                  
                  <ScreenOne>:
                      stuff_a: a1
                      BoxLayout:
                          orientation: 'vertical'
                          rows: 4
                          BoxLayout:
                              orientation: 'vertical'
                              rows: 1
                              size_hint_y: 0.8
                              AsyncImage
                                  id:a1
                                  source:root.img
                                  on_touch_down: app.varChange.changepicturenb()
                  
                          BoxLayout:
                              padding: 10,10,10,0
                              spacing: 10
                              size_hint: 1,0.3
                              orientation: "horizontal"
                              Button:
                                  text: "Clear"
                                  on_touch_down: app.varChange.changeuser()
                              Button:
                                  text: "Remove"
                              Button:
                                  text: "Group"
                              Button:
                                  text: "Color"
                              Button:
                                  text: "Gestures"
                  
                  
                  <Manager>:
                      id: screen_manager
                  
                      screen_one: screen_one
                      screen_two: screen_two
                  
                      ScreenOne:
                          id: screen_one
                          name: "screen1"
                          manager: screen_manager
                  
                      ScreenTwo:
                          id: screen_two
                          name: "screen2"
                          manager: screen_manager
                  

                  還有我的錯(cuò)誤文件:

                  > File "main7.py", line 105, in changeuser
                  >      app.screenone.reloadprofile()    File "main7.py", line 60, in reloadprofile
                  >      self.ids.a1.reload()    File "kivyproperties.pyx", line 839, in kivy.properties.ObservableDict.__getattr__ (kivyproperties.c:12654) 
                  > AttributeError: 'super' object has no attribute '__getattr__'
                  

                  推薦答案

                  正如@eyllanesc 所說(shuō):請(qǐng)?zhí)峁┮粋€(gè)最小、完整和可驗(yàn)證的示例.如果我們首先必須調(diào)試您的代碼以達(dá)到我們可以看到您的問(wèn)題的地步,那么我們需要做更多的工作才能弄清楚您的問(wèn)題是什么.但是因?yàn)槲矣行那橥?code>Kivy:

                  As @eyllanesc said: please provide a Minimal, Complete, and Verifiable example. It takes much more work for us to figure out what your problem is if we first must just debug your code to get to the point where we can see your problem. But since I am in the mood to play with Kivy:

                  你有幾個(gè)問(wèn)題.首先,更改您的 ScreensApp

                  You have several problems. First, change your ScreensApp

                  class ScreensApp(App):
                  
                      def build(self):
                          self.varChange = Change()
                          self.m = Manager(transition=NoTransition())
                          return self.m
                  

                  請(qǐng)注意,您創(chuàng)建的 ScreenOne 已被取消,因?yàn)樗怯?kv 文件中的 <Manager> 規(guī)則創(chuàng)建的.其他語(yǔ)句被移動(dòng)到 build 方法中并保存為實(shí)例變量,因?yàn)槟谄渌胤叫枰鼈?這也允許您在 kv 文件中對(duì) app.varChange 的引用起作用.

                  Note that your creation of a ScreenOne is eliminated, because that is created by your <Manager> rule in the kv file. The other statements are moved into the build method and saved as instance variables, since you need them elsewhere. This also allows your reference to app.varChange in your kv file to work.

                  另外,你需要修改你的 Change 類:

                  Also, you need to modify your Change class:

                  class Change():
                      global Iduserp
                      global imagenb
                      global picadress
                  
                      def changeuser(self):
                  
                          size = sizetable.main()
                          Iduserp = (random.randint(1, size))
                          app = App.get_running_app()
                          app.m.screen_one.reloadprofile()
                  
                      def changepicturenb (self):
                  
                          nbofpic = nbofpictures.main(Iduserp)
                          if imagenb < nbofpic:
                              imagenb += 1
                          else:
                              imagenb = 0
                          app = App.get_running_app()
                          app.m.screen_one.reloadprofile()
                  

                  對(duì) ScreenOne 的引用作為 screen_one 保存在 kv 文件中的 <Manager> 規(guī)則中,因此要訪問(wèn)它,您可以通過(guò) app 找到保存在 build<中的 m (Manager) 引用/code> 方法,然后是 <Manager> 規(guī)則中定義的 screen_one 屬性.我認(rèn)為這可能會(huì)解決您的問(wèn)題,但我不能肯定,因?yàn)槲冶仨殞?duì)示例進(jìn)行更改才能解決問(wèn)題".

                  The reference to ScreenOne is saved in your <Manager> rule in the kv file as screen_one, so to access it you can go through the app, to the m (Manager) reference that was saved in the build method, and then to the screen_one property that was also defined in the <Manager> rule. I think that might fix your problem, but I can't be positive since I had to make changes to the example to get it to the "problem".

                  這篇關(guān)于Python/Kivy AttributeError:“超級(jí)"對(duì)象沒(méi)有屬性“__getattr__"的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

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

                    <legend id='v6CBO'><style id='v6CBO'><dir id='v6CBO'><q id='v6CBO'></q></dir></style></legend>

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

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

                        • <tfoot id='v6CBO'></tfoot>

                            <bdo id='v6CBO'></bdo><ul id='v6CBO'></ul>
                              <tbody id='v6CBO'></tbody>
                          • 主站蜘蛛池模板: 成人免费淫片aa视频免费 | 一区二区三区四区五区在线视频 | 日本精品一区二区三区在线观看视频 | 欧美aⅴ| 国产一区二区在线视频 | 国产视频一区在线观看 | 亚洲免费视频一区 | 日韩在线不卡 | 九九九久久国产免费 | 成年免费大片黄在线观看岛国 | 97影院2| 国产一区二区在线免费观看 | 日韩精品一区二区不卡 | 欧美精品一二三 | 国产免费又色又爽又黄在线观看 | 免费在线观看成人av | 国产精品一区二区免费看 | 日韩综合在线 | 在线观看亚洲 | 91av视频在线观看 | 亚洲色在线视频 | 久久久成人动漫 | 九九热视频这里只有精品 | 欧美视频免费在线 | www视频在线观看 | av网站免费 | 91天堂网 | 亚洲日本激情 | 国产精品视频综合 | 免费成人国产 | 香蕉一区 | 新超碰97 | 福利av在线 | 一区二区视频 | 国产精品视频网 | 欧美一区二区三区 | 日韩成人免费视频 | 淫片一级国产 | 一级日韩 | 国产乱码精品一区二区三区中文 | 日韩一区二区三区视频在线观看 |