Can you share the relevant code? -Jim
On Wednesday, October 14, 2020 at 12:29:54 AM UTC-5, T.R.Rajkumar wrote: > > this is the result of the sp for amcid = 1910 > > unitid amcno thsk tsk tssk tusk awg da vda > pfamt sacamt esiamt > ts2 AHO20DP052 9921.36600 8865.31945 8317.76000 > 31453.64245 8198133.44 0.00 1201554.58 5840151.72 > 532868.36 1460037.93 > > On Wednesday, October 14, 2020 at 10:40:53 AM UTC+5:30 T.R.Rajkumar wrote: > >> >> I get this error for a particular amcid = 1910, for others it is working >> ok. What might be the problem. The sp >> >> usr_getconlabqty_amc_new is indeed returning row from db when checked in the >> backend. please elucidate. >> >> Error ticket for "web_ocms" Ticket ID >> >> 127.0.0.1.2020-10-14.10-26-27.939fd264-ebf8-4e08-aa76-2ca0d84a5703 >> <type 'exceptions.TypeError'> 'NoneType' object is not iterable Version >> web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 >> Python Python 2.7.5: D:\Python\python.exe (prefix: D:\Python) Traceback >> >> 1. >> 2. >> 3. >> 4. >> 5. >> 6. >> 7. >> 8. >> 9. >> 10. >> 11. >> 12. >> >> Traceback (most recent call last): >> File "D:\web2py\gluon\restricted.py", line 227, in restricted >> exec ccode in environment >> File "D:/web2py/applications/web_ocms/controllers/amc.py" >> <http://127.0.0.1:8000/admin/default/edit/web_ocms/controllers/amc.py>, line >> 407, in <module> >> File "D:\web2py\gluon\globals.py", line 417, in <lambda> >> self._caller = lambda f: f() >> File "D:/web2py/applications/web_ocms/controllers/amc.py" >> <http://127.0.0.1:8000/admin/default/edit/web_ocms/controllers/amc.py>, line >> 247, in schII >> rowsconlab = db.executesql("exec usr_getconlabqty_amc_new >> @amcid=?",placeholders=([amcid]),as_dict=True) >> File "D:\web2py\gluon\packages\dal\pydal\base.py", line 1028, in executesql >> fields = colnames or [f[0] for f in columns] >> TypeError: 'NoneType' object is not iterable >> >> Error snapshot [image: help] >> <http://127.0.0.1:8000/admin/default/ticket/web_ocms/127.0.0.1.2020-10-14.10-26-27.939fd264-ebf8-4e08-aa76-2ca0d84a5703#> >> >> >> <type 'exceptions.TypeError'>('NoneType' object is not iterable) >> >> inspect attributes >> Frames >> >> - >> >> *File D:\web2py\gluon\restricted.py in restricted at line 227* code >> arguments variables >> - >> >> *File D:\web2py\applications\web_ocms\controllers\amc.py in <module> >> at line 407* code arguments variables >> - >> >> *File D:\web2py\gluon\globals.py in <lambda> at line 417* code >> arguments variables >> - >> >> *File D:\web2py\applications\web_ocms\controllers\amc.py in schII at >> line 247* code arguments variables >> - >> >> *File D:\web2py\gluon\packages\dal\pydal\base.py in executesql at >> line 1028* code arguments variables >> Function argument list >> >> (self=<DAL uri="mssql2:******@172.16.164.60\SQL16S7INS1/ocms_nlc">, >> query='exec usr_getconlabqty_amc_new @amcid=?', placeholders=['1910'], >> as_dict=True, fields=None, colnames=None, as_ordered_dict=False) >> Code listing >> >> 1023. >> 1024. >> 1025. >> 1026. >> 1027. >> 1028. >> >> 1029. >> 1030. >> 1031. >> 1032. >> >> # Non-DAL legacy db query, converts cursor results to dict. >> # sequence of 7-item sequences. each sequence tells about a >> column. >> # first item is always the field name according to Python >> Database API specs >> columns = adapter.cursor.description >> # reduce the column info down to just the field names >> fields = colnames or [f[0] for f in columns] >> >> if len(fields) != len(set(fields)): >> raise RuntimeError("Result set includes duplicate column >> names. Specify unique column names using the 'colnames' argument") >> #: avoid bytes strings in columns names (py3) >> if columns and not PY2: >> >> Variables >> fields None >> colnames None >> columns None >> f undefined >> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/19abd8c8-f1bd-4522-b235-43e782695202o%40googlegroups.com.