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

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

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

    2. Kivy:錯誤弱引用對象(在時鐘函數(shù)中)不再存在

      Kivy : Error weakly-referenced object (in a clock function) no longer exists(Kivy:錯誤弱引用對象(在時鐘函數(shù)中)不再存在)

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

            <tbody id='2cmPM'></tbody>

            <legend id='2cmPM'><style id='2cmPM'><dir id='2cmPM'><q id='2cmPM'></q></dir></style></legend>
              • <bdo id='2cmPM'></bdo><ul id='2cmPM'></ul>
                本文介紹了Kivy:錯誤弱引用對象(在時鐘函數(shù)中)不再存在的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                這是我的錯誤代碼我認為這個錯誤有什么難的地方,我在論壇上找過,但沒有找到.

                So here is my error code I think there's something hard in this error, i looked on forums but couldn't find out.

                而且...我的手機出現(xiàn)錯誤(使用 kivy啟動器 python 3 以及當(dāng)我使用 buildozer 構(gòu)建時)但不在我的計算機上(ubuntu 18.0.4 和 windows 10)據(jù)我了解,該錯誤來自刪除引用的垃圾收集器,并且代碼嘗試在垃圾收集器之后訪問引用.但我不確定我是否理解垃圾收集器的事情

                And ... i have the error on my phone (with kivy launcher python 3 and when i build with buildozer) but not on my computer (ubuntu 18.0.4 and windows 10) The error, from what i understand, comes from the garbage collector that delete a reference and the code try to access the reference after the garbage collector. but i am not sure if I rly understand the garbage collector thing

                我嘗試了什么:

                • 制作強引用",以便 gc 不會將其刪除:
                    id: id.__self__
                

                在我的 kv 文件中

                • 使用以下方法進行強引用":
                     self.refs = [
                                self.id.__self__,
                                self.id.__self__]
                

                -使用ErrorHandler來處理錯誤,但錯誤總是會出現(xiàn)

                -Use the ErrorHandler to handle the error but the error keep coming for ever

                我認為是什么導(dǎo)致了錯誤,但我不知道如何解決它:

                • 我用來向服務(wù)器發(fā)送請求的時鐘,但我不知道為什么(self.requestClient 是一個發(fā)送請求的函數(shù)):

                • the clock I use to send request to the server but i don't know why (self.requestClient is a function to send a request) :

                C = Clock.schedule_interval(self.requestClient, 5)

                C = Clock.schedule_interval(self.requestClient, 5)

                此信息在 kivy 時鐘文檔 :

                重要

                回調(diào)是弱引用的:你負責(zé)保持一個引用您的原始對象/回調(diào).如果你不保留一個參考,ClockBase 永遠不會執(zhí)行你的回調(diào)

                The callback is weak-referenced: you are responsible for keeping a reference to your original object/callback. If you don’t keep a reference, the ClockBase will never execute your callback

                錯誤:

                [ERROR  ] Exception catched by ExceptionHandler
                05-07 11:27:45.694  2788  2823 I python  : Traceback (most recent call last):
                05-07 11:27:45.694  2788  2823 I python  :   File path/kivy-launcher/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/launcher/kivy/core/window/window_sdl2.py", line 747, in mainloop
                05-07 11:27:45.694  2788  2823 I python  :   File "/path/kivy-launcher/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/launcher/kivy/core/window/window_sdl2.py", line 479, in _mainloop
                05-07 11:27:45.694  2788  2823 I python  :   File "/path/kivy-launcher/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/launcher/kivy/base.py", line 339, in idle
                05-07 11:27:45.694  2788  2823 I python  :   File "/path/kivy-launcher/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/launcher/kivy/clock.py", line 591, in tick
                05-07 11:27:45.694  2788  2823 I python  :   File "kivy/_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
                05-07 11:27:45.694  2788  2823 I python  :   File "kivy/_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
                05-07 11:27:45.694  2788  2823 I python  :   File "kivy/_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
                05-07 11:27:45.694  2788  2823 I python  :   File "kivy/_clock.pyx", line 154, in kivy._clock.ClockEvent.tick
                05-07 11:27:45.694  2788  2823 I python  :   File "kivy/_clock.pyx", line 86, in kivy._clock.ClockEvent.get_callback
                05-07 11:27:45.694  2788  2823 I python  :   File "/path/kivy-launcher/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/launcher/kivy/weakmethod.py", line 56, in is_dead
                05-07 11:27:45.694  2788  2823 I python  : ReferenceError: weakly-referenced object no longer exists
                

                感謝閱讀!

                推薦答案

                官方文檔(Kv 語言編程指南) 說要在 KV 代碼中添加諸如 id_name: id_name.__self__ 之類的強"引用,但不清楚這在哪里是必要的.更重要的是,它并沒有為我解決 ReferenceError:weakly-referenced object no longer exists 錯誤.

                The official documentation (Kv language Programming Guide) says to add 'strong' references such as id_name: id_name.__self__ in the KV code, but it is unclear where this is necessary. What's more, it did not solve the ReferenceError: weakly-referenced object no longer exists errors for me.

                所做 的工作是通過將其添加到 buildozer.spec 文件的 requirements 行來強制 Buildozer 使用特定版本的 hostpython3:

                What did work is forcing Buildozer to use a specific version of hostpython3 by adding this to the requirements line of the buildozer.spec file:

                python3==3.7.5, hostpython3==3.7.5
                

                還有一點需要注意:在將上述內(nèi)容添加到 requirements 之后,我返回并刪除了所有 __self__ 引用,它仍然可以正常工作,因此顯然不再需要這些引用在 Kivy KV 語言中.

                One more note: after adding the above to requirements, I went back and removed all my __self__ references and it still worked fine, so apparently these are no longer needed in Kivy KV language.

                這要歸功于 leo10011 的精彩回答.

                2020-05-19 更新:這個錯誤 據(jù)報道已在 Kivy 2.0 中修復(fù).

                這篇關(guān)于Kivy:錯誤弱引用對象(在時鐘函數(shù)中)不再存在的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                Get current location during app launch(在應(yīng)用啟動期間獲取當(dāng)前位置)
                locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)

                • <bdo id='umixA'></bdo><ul id='umixA'></ul>
                  <legend id='umixA'><style id='umixA'><dir id='umixA'><q id='umixA'></q></dir></style></legend>
                    <tbody id='umixA'></tbody>

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

                        • <tfoot id='umixA'></tfoot>
                        • <i id='umixA'><tr id='umixA'><dt id='umixA'><q id='umixA'><span id='umixA'><b id='umixA'><form id='umixA'><ins id='umixA'></ins><ul id='umixA'></ul><sub id='umixA'></sub></form><legend id='umixA'></legend><bdo id='umixA'><pre id='umixA'><center id='umixA'></center></pre></bdo></b><th id='umixA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='umixA'><tfoot id='umixA'></tfoot><dl id='umixA'><fieldset id='umixA'></fieldset></dl></div>
                          主站蜘蛛池模板: 最新av在线网址 | 中文字幕高清 | 日韩中文视频 | 给我免费的视频在线观看 | 国产精品久久久久aaaa樱花 | 久久极品| 国产精品电影在线观看 | 国产精品久久久久久吹潮 | 视频在线观看一区 | 日本在线你懂的 | 日本一区二区三区在线观看 | 精品国产欧美一区二区三区成人 | 欧美亚洲另类在线 | 亚洲一区日韩 | 美女久久久久 | 北条麻妃视频在线观看 | 中文字幕一区在线观看视频 | 久久久久国产一区二区三区 | 国产精品久久av | 成人深夜福利在线观看 | 日韩一区在线播放 | www.久久久.com | 亚洲精品欧美一区二区三区 | 狠狠操狠狠色 | 淫片专区| 久久国产视频播放 | 久久最新网址 | 欧美一级免费看 | 一级片av | av一区二区三区在线观看 | 亚洲狠狠 | 久久精品国产99国产精品 | 久久最新 | 国产美女一区二区 | 欧美黄色一区 | 欧美高清一区 | www.日韩高清 | 91精品国产综合久久福利软件 | 欧美一区二区三区四区在线 | 久久亚洲国产 | 国产999精品久久久久久 |