Getting <type 'exceptions.ImportError'> cannot import name table_field after upgrading to 2.12.3

51 views
Skip to first unread message

Rahul

unread,
Aug 24, 2015, 6:22:49 AM8/24/15
to web2py-users
Hi All,
       Recently I upgraded to version 2.12.3 and  I am getting this type exception  - I am using Plugin solidtable -  Is there something that needs to be done differently or something that needs to be changed? Please suggest - Note: On version 2.9.5 it used to working just fine.

<type 'exceptions.ImportError'> cannot import name table_field
  File "D:/web2py2.12.3/web2py/web2py/applications/AHM/models/db.py", line 26, in <module>
from plugin_solidtable import SOLIDTABLE
File "D:\web2py2.12.3\web2py\web2py\gluon\custom_import.py", line 95, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
File "applications\AHM\modules\plugin_solidtable.py", line 5, in <module>
from gluon.sqlhtml import table_field, represent, Row
ImportError: cannot import name table_field

Please suggest - Rahul

Johann Spies

unread,
Aug 24, 2015, 9:23:24 AM8/24/15
to web...@googlegroups.com
I had similar problems which convinced me to to stop using solidtable.

Regards
Johann


--
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

Paolo Valleri

unread,
Aug 24, 2015, 11:06:27 AM8/24/15
to web2py-users

Rahul

unread,
Aug 25, 2015, 1:23:42 AM8/25/15
to web2py-users

Thanks for getting back with replies

For me I looked at the fix 
----
Added 2 lines to modules/plugin_solidtable.py

import re
table_field
= re.compile('[\w_]+\.[\w_]+')


I chose to add table_field statement to _create_td(...) function, where it is used.
-----

However I was not able to make it work. :-(

Next up  is suggestions for a checkbox enabled table -  Does SQLForm.grid() suppport checkboxes for selecting multiple records and doing something with them (probably mass delete or mass actions like merge etc ??)

Cheers Rahul.
Reply all
Reply to author
Forward
0 new messages