Exception Error: 'Field' object has no attribute '__dir__'

90 views
Skip to first unread message

mostwanted

unread,
Dec 8, 2023, 12:39:49 PM12/8/23
to web2py-users
Hi guys, I recently 'upgraded' my web2py version to the latest version (2.27.1) but i've forgotten the previous version. Now suddenly when i try to submit forms i get this error:   'Field' object has no attribute '__dir__'

Below is the tracebeack
Traceback
Traceback (most recent call last):
File "/home/sesoa/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/home/sesoa/web2py/applications/init/controllers/default.py", line 920, in <module>
File "/home/sesoa/web2py/gluon/globals.py", line 463, in <lambda>
self._caller = lambda f: f()
File "/home/sesoa/web2py/applications/init/controllers/default.py", line 315, in business_registration
if form.process().accepted:
File "/home/sesoa/web2py/gluon/html.py", line 2410, in process
self.validate(**kwargs)
File "/home/sesoa/web2py/gluon/html.py", line 2349, in validate
if self.accepts(**kwargs):
File "/home/sesoa/web2py/gluon/sqlhtml.py", line 2132, in accepts
source_file, original_filename, field.uploadfolder
File "/home/sesoa/web2py/gluon/packages/dal/pydal/objects.py", line 2075, in store
self._tablename if '_tablename' in self.__dir__() and self._tablename else 'no_table',
AttributeError: 'Field' object has no attribute '__dir__'

mostwanted

unread,
Dec 12, 2023, 5:06:28 AM12/12/23
to web2py-users
Is there something wrong with the upload functionality or is just my app?

Massimo Di Pierro

unread,
Dec 28, 2023, 3:30:06 AM12/28/23
to web2py-users
This is fixed in master, although I failed to reproduce. Thanks for reporting it and suggesting the fix.
Reply all
Reply to author
Forward
0 new messages