You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a field with with_alias, rows.as_csv() fail with a KeyError, so also printing rows as:
print(rows)
will fail.
How to reproduce:
from random import random
db = DAL('sqlite:memory')
db.define_table('test',
Field('a'),
Field('b'),
)
for i in range(10):
db.test.insert(a=str(i), b=str(random()))
db.commit()
f = [
db.test.a.with_alias('a'),
db.test.b,
]
rows= db(db.test.id).select(*f)
print(rows.as_csv())
...
KeyError: '"test"."a" AS a'
The text was updated successfully, but these errors were encountered:
pydal version: 20250501.2
When using a field with with_alias,
rows.as_csv()
fail with a KeyError, so also printing rows as:will fail.
How to reproduce:
The text was updated successfully, but these errors were encountered: