AnswerDotAI / AnswerDotAI/fasthtml-tut

errors when trying running all simple examples

Open
#1 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
22
Forks
6
PR merge metrics
No merged PRs in 30d

Description

when running simple01.py

...
app = fast_app()
rt = app.route
...

get this error:

rt = app.route
^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'route'

when running simple02.py:
...
app,todos,Todo = fast_app('data/todos.db', id=int, title=str, done=bool, pk='id')
rt = app.route
....

get his error:

app,todos,Todo = fast_app('data/todos.db', id=int, title=str, done=bool, pk='id')
^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)

I think that this examples are for a previous version when the returned objects are different.

Also, the FT functions are not recognized.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with simple01.py and simple02.py, then inspect how the current fast_app return values and FT functions are used in the tutorial examples. Run the simple examples to reproduce the reported AttributeError, unpacking error, and missing FT functions; done means the examples run with the current API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.