-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trolli (Trello Clone) Tutorial Incomplete and Corresponding Github example broken. #115
Comments
The issue that I mentioned regarding the broken Github example for this app is the same as this: #102 |
Also related: flet-dev/flet#1553 |
You received this error ( AttributeError: 'TrelloApp' object has no attribute '_build_add_commands'), cause the TrelloApp class is missing UserControl class. |
and in case you download the source code and get an error same as the one in live demo like this one below... =>There was an error while processing your request: 'NoneType' object have no attribute 'width'. here is what I do.. => First, I put app.initialize() above page.add(app) my main function look like the one below
=> secondly I comment build function and initialize self.layout in init function like the code below
=> after changing everything like that the code worked, I released the NoneType error was rised because self.page was not being initialized |
In the latest release notes (dated 6. March 2024) it states that the UserControl class has been deprecated. https://flet.dev/blog/flet-fastapi-and-async-api-improvements/#custom-controls-api-normalized So anyone installing afterwards, this tutorial, and this fix will not work, however I am one of those people so we are all still waiting for the fix. |
I will look to that, if I come up with any solution for that, I will post my solution here |
Can you please give the code another try? It has been updated. |
Description
The Trolli tutorial appears to be incomplete. I think the TrelloApp class is missing its UserControl parent and also its build() method. I also visited the corresponding github repo for this app https://github.com/flet-dev/examples/tree/main/python/apps/trolli which, upon running main.py after creating a new virtual environment and installing the project requirements, I encountered an error on the create_new_board implementation where the Board() is receiving a None type for its first arg instead a control.
Code example to reproduce the issue:
Follow this first section:
https://flet.dev/docs/tutorials/trello-clone#defining-entities-and-layout
Describe the results you received:
AttributeError: 'TrelloApp' object has no attribute '_build_add_commands'
Describe the results you expected:
According to the tutorial:
"we can see the result and get hot reloading when we make any style changes. For example, try adding alignment="center" to the first row in the container like this…"
Flet version (pip show flet):
Version: 0.20.0
Give your requirements.txt file (don't pip freeze, instead give direct packages):
anyio==4.2.0
arrow==1.3.0
binaryornot==0.4.4
certifi==2024.2.2
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
cookiecutter==2.5.0
flet==0.20.0
flet-core==0.20.0
flet-runtime==0.20.0
h11==0.14.0
httpcore==0.17.3
httpx==0.24.1
idna==3.6
Jinja2==3.1.3
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mdurl==0.1.2
oauthlib==3.2.2
packaging==23.2
Pygments==2.17.2
pypng==0.20220715.0
python-dateutil==2.8.2
python-slugify==8.0.4
PyYAML==6.0.1
qrcode==7.4.2
repath==0.9.0
requests==2.31.0
rich==13.7.0
six==1.16.0
sniffio==1.3.0
text-unidecode==1.3
types-python-dateutil==2.8.19.20240106
typing_extensions==4.9.0
urllib3==2.2.0
watchdog==3.0.0
websocket-client==1.7.0
websockets==11.0.3
Operating system:
macOS
The text was updated successfully, but these errors were encountered: