trying to give out some hints. seems that the first query you run after 
calling the sp doesn't find a resultset.
possible problems:
- whenever raising an exception on db.executesql, always call db.rollback() 
to flush out the cursor
- instead of using db._adapter.parse, just pass fields and colnames to 
db.executesql() directly


On Thursday, February 21, 2013 9:07:25 PM UTC+1, __pyslan__ wrote:
>
> Sorry...
>
> The error occur on line 3 of this file:
>
> https://gist.github.com/pyslan/5007722
>
>
> On Thu, Feb 21, 2013 at 4:45 PM, __pyslan__ - Ayslan Jenken <
> ayslan...@gmail.com <javascript:>> wrote:
>
>> Hello, Erevybody!
>>
>> I am using MySQL on a project and created two procedures to perform a 
>> recursion, because users have users parents.
>>
>> The extra fields in the users table:
>> https://gist.github.com/pyslan/5007384
>>
>>
>> Performing some research and testing, I came to the code as follows:
>> https://gist.github.com/pyslan/5007364
>>
>> And the stored procedures [1]:
>>
>> https://gist.github.com/pyslan/5007439
>>
>> https://gist.github.com/pyslan/5007414
>>
>>
>>
>> Running the first time the page is created normally and shows the page 
>> with the data correctly. If I refresh the page, generates the following 
>> error:
>> <type'exceptions.TypeError'> 'NoneType' object is not iterable
>> If I upgrade again, again shows the correct page, and so on.
>>
>> I tried with migrate = False, and the behavior continues.
>>
>>
>> Does anyone have any idea what is causing this error, or a correct way of 
>> doing this using web2py and stored procedures with MySQL?
>>
>>
>> Thanks, guys!
>> [1] - Procedures adapted from that site: http://goo.gl/l6Nc2
>>  
>
>

-- 

--- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to