运行trollil 例子出现'NoneType' object has no attribute 'width'错误,原因是flet_core\page.py:466 ctrl.page = None 将其赋值为None,请问是什么问题导致的呢
              
              #2077
            
            
              
                Unanswered
              
          
                  
                    
                      get-Resource
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Question
我安装以下步骤运行,然后收到'NoneType' object has no attribute 'width'异常
经过分析发现在
src\main.py:83 self.page.update()后self.page就会等于None跟踪下去是
flet_core\page.py:466 ctrl.page = None将其赋值为None请问是什么问题导致的呢,以下是我的版本
我将
flet_core\page.py:466 ctrl.page = None改为if ctrl.page != self: ctrl.page = None就不出现这个异常了,我不了解为啥需要设置为NoneCode sample
No response
Error message
No response
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions