Re: [web2py] Re: Object type None error

2020-10-19 Thread Jim Steil
Very happy that you found the solution.

Jim


On Mon, Oct 19, 2020, 1:04 AM T.R.Rajkumar  wrote:

> Dear Jim S
>  I found the error to be in the database in one of the tables. When I
> corrected the form worked nicely. It was all a programming error on my
> part. Thank you so much for your valuable time and effort in helping me
> out. Web2py rocks.
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/IVY_TyXGsjE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/e311ffea-aa0c-45a2-962e-3423fcfe938ao%40googlegroups.com
> 
> .
>

-- 
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/CAERBpoDrQ-JMddT%3D3Krwp1DYG4rUMY7xgPFbweVgW%3D0vn6JRgQ%40mail.gmail.com.


[web2py] Re: Object type None error

2020-10-19 Thread T.R.Rajkumar
Dear Jim S
 I found the error to be in the database in one of the tables. When I 
corrected the form worked nicely. It was all a programming error on my 
part. Thank you so much for your valuable time and effort in helping me 
out. Web2py rocks.

-- 
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/e311ffea-aa0c-45a2-962e-3423fcfe938ao%40googlegroups.com.


[web2py] Re: Object type None error

2020-10-17 Thread Jim S
Ok, I'm at a loss for what the problem could be.

To further troubleshoot I'd probably open a web2py shell for your app and 
try different things with a good amcid and with 1910.  

python web2py.py -S application_name
(http://web2py.com/books/default/chapter/29/04/the-core#Command-line-options)

I'd try

-hard coding the stored procedure call with the id instead of using 
variable substitution
-depending on how complex the stored procedure is, start issuing those sql 
statements and see if you can determine where something is going wrong
-when you say the sp does return values for that id, are you testing via 
python (not using pydal) or in a database tool?  If not in Python, can you 
test without using pydal and see what the results are?

-Jim


On Saturday, October 17, 2020 at 2:16:58 AM UTC-5, T.R.Rajkumar wrote:
>
> The print rowsconlab for id other than 1910 is 
>
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2020
> Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
> Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000
> please visit:
> http://127.0.0.1:8000/
> starting browser...
> [{'thsk': '0.0', 'tsk': '0.0', 'unitid': 'ts2', 'da': '0.00', 
> 'vda': '0.
> 00', 'sacamt': '0.00', 'amcno': 'PLT17CS051', 'tusk': '0.0', 'awg': 
> '0.00',
> 'esiamt': '0.00', 'pfamt': '0.00', 'tssk': '0.0'}]
>
> for id 1910 there is nothing printed in the cmd window.
>
> but the sp does return result below for id 1910
>
> unitidamcnothsktsktssktuskawgdavda
> pfamtsacamtesiamt
> ts2AHO20DP05710.00.00.010.0
> 2800.000.00460.002042.56186.78510.64
>
> for reasons unknow  to me web2py dal is not reading the result, resulting 
> in None type object not iterable error.
>
>

-- 
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/0b6278d3-e3a6-438a-8f64-14f5398d63eco%40googlegroups.com.


[web2py] Re: Object type None error

2020-10-17 Thread T.R.Rajkumar
The print rowsconlab for id other than 1910 is 

web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2020
Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000
please visit:
http://127.0.0.1:8000/
starting browser...
[{'thsk': '0.0', 'tsk': '0.0', 'unitid': 'ts2', 'da': '0.00', 
'vda': '0.
00', 'sacamt': '0.00', 'amcno': 'PLT17CS051', 'tusk': '0.0', 'awg': 
'0.00',
'esiamt': '0.00', 'pfamt': '0.00', 'tssk': '0.0'}]

for id 1910 there is nothing printed in the cmd window.

but the sp does return result below for id 1910

unitidamcnothsktsktssktuskawgdavda
pfamtsacamtesiamt
ts2AHO20DP05710.00.00.010.0
2800.000.00460.002042.56186.78510.64

for reasons unknow  to me web2py dal is not reading the result, resulting 
in None type object not iterable error.

-- 
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/b412c91d-090f-4048-8c69-4292e7978a33o%40googlegroups.com.


[web2py] Re: Object type None error

2020-10-16 Thread Jim S
What is the value of rowsconlab immediately following the executesql 
statement for id 1910 and for one that works?

-Jim

On Friday, October 16, 2020 at 7:03:49 AM UTC-5, 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.
>>
>> Actually the code is working fine, but for a particular id 1910 it 
> reports error None cannot be iterated. The database does return the result 
> but in dal/base.py as_dict check function the variable columns is not 
> intialized as the execulte sql is returning None, I think so. But for all 
> other amcids it is working fine. How to debug this. 
>  
>  
>

-- 
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/d62ffbbd-8f40-4bde-9e1e-0e4dbf31f129o%40googlegroups.com.


[web2py] Re: Object type None error

2020-10-16 Thread T.R.Rajkumar



>- 
>
>
>
>
>
>
>
>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.
>
> Actually the code is working fine, but for a particular id 1910 it reports 
error None cannot be iterated. The database does return the result but in 
dal/base.py as_dict check function the variable columns is not intialized 
as the execulte sql is returning None, I think so. But for all other amcids 
it is working fine. How to debug this. 
 
 

-- 
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/5037b009-1e5e-4885-8409-9439b4fc398co%40googlegroups.com.


[web2py] Re: Object type None error

2020-10-15 Thread Jim S
Instead of 

rowsconlab = db.executesql("exec usr_getconlabqty_amc_new 
@amcid=?",placeholders=([amcid]),as_dict=True)

can you try:

rowsconlab = db.executesql("exec usr_getconlabqty_amc_new 
@amcid=?",placeholders=[amcid],as_dict=True)

I removed the parentheses around [amcid]

-Jim

On Thursday, October 15, 2020 at 5:49:38 AM UTC-5, T.R.Rajkumar wrote:


>
>
>>- 
>>
>>
>>
>>
>>
>>def schII():
>>if not URL.verify(request, hmac_key=KEY): raise HTTP(403)
>>amcid = request.vars.amcid
>>rowsamcdet = db(db.amc_details.amc_id == 
>>amcid).select(db.amc_details.amcno)
>>if not rowsamcdet:
>>session.flash = "No jobs to make provn"
>>redirect(URL('new_contract'))
>>amcnod = db(db.amc_master.id == 
>>amcid).select(db.amc_master.amcno).first()
>>x = db(db.cont_overheads.amc_id == amcid).select(
>>db.cont_overheads.id)
>>for i in x:
>>record = i['id']
>>#rows = db(db.cont_overheads.id == record).select()
>>fields = ['phhskn','phhskd','phhsk',
>>  'phskn','phskd','phsk',
>>  'phsskn','phsskd','phssk',
>>  'phuskn','phuskd','phusk',
>>  'alwhskn','alwhskd','alwhsk',
>>  'alwskn','alwskd','alwsk',
>>  'alwsskn','alwsskd','alwssk',
>>  'alwuskn','alwuskd','alwusk',
>>  'tax','insurance','sac','bonus',
>>  'supchr','fringes']
>>form = 
>>SQLFORM(db.cont_overheads,record,keepvalues=True,fields=fields)
>>if form.process(session=None, 
>>formname='frmschII',dbio=False,onvalidation=schII_validation).accepted:
>>form.vars.amc_id = amcid
>>form.vars.update_uid = session.uname
>>form.vars.amcno = amcnod['amcno']
>>form.record.update_record(**dict(form.vars))
>>db.executesql("exec update_load_schII_amt_awg @amcid = 
>>?",placeholders=([form.vars.amc_id]))
>>session.flash = 'Overheads updated.'
>>redirect(URL('new_contract'))
>>elif form.errors:
>>print form.errors
>>response.flash = 'form has errors'
>>else:
>>response.flash = 'please fill the form'
>># Note: no form instance is passed to the view
>>## record passed to set the id value in view.
>>rows = db(db.cont_overheads.id == record).select()
>>rowsconlab = db.executesql("exec usr_getconlabqty_amc_new 
>>@amcid=?",placeholders=([amcid]),as_dict=True)
>>rowsrate = get_amc_rate(amcid)
>>return 
>>dict(record=record,rowsconlab=rowsconlab,rows=rows,rowsrate=rowsrate)
>>
>>
> the error occurs in the  line marked red.
>

-- 
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/f4ae9bfc-3657-4751-ad74-473542f339a0o%40googlegroups.com.


Re: [web2py] Re: Object type None error

2020-10-15 Thread Carlos Correia

On 15/10/20 11:49, T.R.Rajkumar wrote:



 *





def schII():
    if not URL.verify(request, hmac_key=KEY): raise HTTP(403)
    amcid = request.vars.amcid
    rowsamcdet = db(db.amc_details.amc_id ==
amcid).select(db.amc_details.amcno)
    if not rowsamcdet:
    session.flash = "No jobs to make provn"
    redirect(URL('new_contract'))
    amcnod = db(db.amc_master.id ==
amcid).select(db.amc_master.amcno).first()
    x = db(db.cont_overheads.amc_id == 
amcid).select(db.cont_overheads.id)
    for i in x:
    record = i['id']
    #rows = db(db.cont_overheads.id == record).select()
    fields = ['phhskn','phhskd','phhsk',
  'phskn','phskd','phsk',
  'phsskn','phsskd','phssk',
  'phuskn','phuskd','phusk',
  'alwhskn','alwhskd','alwhsk',
  'alwskn','alwskd','alwsk',
  'alwsskn','alwsskd','alwssk',
  'alwuskn','alwuskd','alwusk',
  'tax','insurance','sac','bonus',
  'supchr','fringes']
    form = 
SQLFORM(db.cont_overheads,record,keepvalues=True,fields=fields)
    if form.process(session=None,
formname='frmschII',dbio=False,onvalidation=schII_validation).accepted:
    form.vars.amc_id = amcid
    form.vars.update_uid = session.uname
    form.vars.amcno = amcnod['amcno']
form.record.update_record(**dict(form.vars))
    db.executesql("exec update_load_schII_amt_awg @amcid =
?",placeholders=([form.vars.amc_id]))
    session.flash = 'Overheads updated.'
    redirect(URL('new_contract'))
    elif form.errors:
    print form.errors
    response.flash = 'form has errors'
    else:
    response.flash = 'please fill the form'
    # Note: no form instance is passed to the view
    ## record passed to set the id value in view.
    rows = db(db.cont_overheads.id == record).select()
rowsconlab = db.executesql("exec usr_getconlabqty_amc_new
@amcid=?",placeholders=([amcid]),as_dict=True)
    rowsrate = get_amc_rate(amcid)
    return
dict(record=record,rowsconlab=rowsconlab,rows=rows,rowsrate=rowsrate)


the error occurs in the  line marked red.



EXEC is not a SQL statement.

--
Com os melhores cumprimentos,

Carlos Correia
=
MEMÓRIA PERSISTENTE
GSM:  917 157 146 (Signal, WhatsApp)
e-mail: ge...@memoriapersistente.pt
URL: http://www.memoriapersistente.pt
XMPP (Jabber): car...@memoriapersistente.pt
GnuPG: wwwkeys.eu.pgp.net

--
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/4505c34b-a2c3-cb64-f363-e27c8f55d1e9%40memoriapersistente.pt.


[web2py] Re: Object type None error

2020-10-15 Thread T.R.Rajkumar



>- 
>
>
>
>
>
>def schII():
>if not URL.verify(request, hmac_key=KEY): raise HTTP(403)
>amcid = request.vars.amcid
>rowsamcdet = db(db.amc_details.amc_id == 
>amcid).select(db.amc_details.amcno)
>if not rowsamcdet:
>session.flash = "No jobs to make provn"
>redirect(URL('new_contract'))
>amcnod = db(db.amc_master.id == 
>amcid).select(db.amc_master.amcno).first()
>x = db(db.cont_overheads.amc_id == 
>amcid).select(db.cont_overheads.id)
>for i in x:
>record = i['id']
>#rows = db(db.cont_overheads.id == record).select()
>fields = ['phhskn','phhskd','phhsk',
>  'phskn','phskd','phsk',
>  'phsskn','phsskd','phssk',
>  'phuskn','phuskd','phusk',
>  'alwhskn','alwhskd','alwhsk',
>  'alwskn','alwskd','alwsk',
>  'alwsskn','alwsskd','alwssk',
>  'alwuskn','alwuskd','alwusk',
>  'tax','insurance','sac','bonus',
>  'supchr','fringes']
>form = 
>SQLFORM(db.cont_overheads,record,keepvalues=True,fields=fields)
>if form.process(session=None, 
>formname='frmschII',dbio=False,onvalidation=schII_validation).accepted:
>form.vars.amc_id = amcid
>form.vars.update_uid = session.uname
>form.vars.amcno = amcnod['amcno']
>form.record.update_record(**dict(form.vars))
>db.executesql("exec update_load_schII_amt_awg @amcid = 
>?",placeholders=([form.vars.amc_id]))
>session.flash = 'Overheads updated.'
>redirect(URL('new_contract'))
>elif form.errors:
>print form.errors
>response.flash = 'form has errors'
>else:
>response.flash = 'please fill the form'
># Note: no form instance is passed to the view
>## record passed to set the id value in view.
>rows = db(db.cont_overheads.id == record).select()
>rowsconlab = db.executesql("exec usr_getconlabqty_amc_new 
>@amcid=?",placeholders=([amcid]),as_dict=True)
>rowsrate = get_amc_rate(amcid)
>return 
>dict(record=record,rowsconlab=rowsconlab,rows=rows,rowsrate=rowsrate)
>
>
the error occurs in the  line marked red.

-- 
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/dede93b9-3709-412a-9a33-dbea09285ae6o%40googlegroups.com.


[web2py] Re: Object type None error

2020-10-14 Thread Jim S
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
>
> unitidamcnothsktsktssktuskawgdavda
> pfamtsacamtesiamt
> ts2AHO20DP0529921.366008865.319458317.76000
> 31453.642458198133.440.001201554.585840151.72
> 532868.361460037.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
>>  '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" 
>> , line 
>> 407, in 
>>   File "D:\web2py\gluon\globals.py", line 417, in 
>> self._caller = lambda f: f()
>>   File "D:/web2py/applications/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] 
>> 
>>  
>>
>> ('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  
>>at line 407* code arguments variables 
>>- 
>>
>>*File D:\web2py\gluon\globals.py in  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=, 
>>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.


[web2py] Re: Object type None error

2020-10-13 Thread T.R.Rajkumar
this is the result of the sp for amcid = 1910

unitidamcnothsktsktssktuskawgdavda
pfamtsacamtesiamt
ts2AHO20DP0529921.366008865.319458317.76000
31453.642458198133.440.001201554.585840151.72
532868.361460037.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
>  '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" 
> , line 
> 407, in 
>   File "D:\web2py\gluon\globals.py", line 417, in 
> self._caller = lambda f: f()
>   File "D:/web2py/applications/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] 
> 
>  
>
> ('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  
>at line 407* code arguments variables 
>- 
>
>*File D:\web2py\gluon\globals.py in  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=, 
>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/df927438-f572-40ac-8db3-52ea122845cen%40googlegroups.com.