flet-dev / examples

Flet sample applications
MIT License
420 stars 171 forks source link

AttributeError: 'NoneType' object has no attribute 'go' [Trillo app] #104

Open Jawangana1 opened 7 months ago

Jawangana1 commented 7 months ago

flet 0.12.1 Python 3.11 Windows IDE vscode

I cloned the repo and run the main file and got the below error.

image

The error:

PS C:\Users\admin\trolli> & C:/Python311/python.exe c:/Users/admin/trolli/trolli/src/main.py
Unhandled error processing page session : Traceback (most recent call last):
  File "C:\Users\admin\AppData\Roaming\Python\Python311\site-packages\flet_runtime\app.py", line 363, in on_session_created
    session_handler(page)
  File "c:\Users\admin\trolli\trolli\src\main.py", line 207, in main
    app.initialize()
  File "c:\Users\admin\trolli\trolli\src\main.py", line 87, in initialize
    self.page.go("/")
    ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'go'
nosinga commented 6 months ago

Apparently the following line causes this error

    self.page.views.clear()

line 74 in main.py

If you comment that line it works