Skip to content

databases folder missing for the example app todo #1

@andreaschizzali

Description

@andreaschizzali

By running the py4web-example-apps I get the following error message for the todo app:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\github\\py4web-example-apps\\apps\\todo\\databases\\sql.log'
The app todo is minimalistic, there is only init.py with
```
db = DAL(
"sqlite://storage.db", folder=os.path.join(os.path.dirname(file), "databases")
)
db.define_table("todo", Field("info"))
db.commit()


In a new Installation the folder "databases" ist not present. Perheaps the issue can be solved so:

from py4web.core import required_folder
db = DAL(
"sqlite://storage.db", folder=required_folder(os.path.dirname(file), "databases")
)
db.define_table("todo", Field("info"))
db.commit()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions