Hello everybody, I have not found a solution yet ... Does anyone have any idea how I could do?
Thanks... On Fri, Feb 22, 2013 at 9:33 AM, __pyslan__ - Ayslan Jenken < ayslan.pyt...@gmail.com> wrote: > Well... > > Sorry, but the information about the code comment is wrong... > > I uncomment the code block "if db(db.auth_user).isempty():" and the error > not thrown. > > With or without the code block above, in the terminal server is shown the > error: > > DEBUG: connect attempt 0, connection error: > > Traceback (most recent call last): > File "/home/ctx/PROJECTS/WEB/web2py/gluon/dal.py", line 6853, in __init__ > self._adapter = ADAPTERS[self._dbname](**kwargs) > File "/home/ctx/PROJECTS/WEB/web2py/gluon/dal.py", line 2402, in __init__ > if do_connect: self.reconnect() > File "/home/ctx/PROJECTS/WEB/web2py/gluon/dal.py", line 588, in reconnect > self.cursor = cursor and self.connection.cursor() > AttributeError: 'NoneType' object has no attribute 'cursor' > > > > > On Fri, Feb 22, 2013 at 9:12 AM, __pyslan__ - Ayslan Jenken < > ayslan.pyt...@gmail.com> wrote: > >> Hello, Massimo. >> >> With this change is launched this error: >> >> Traceback (most recent call last): >> File "/ home/ctx/PROJECTS/WEB/web2py/gluon/main.py", line 632, in >> wsgibase >> BaseAdapter.close_all_instances ('rollback') >> File "/ home/ctx/PROJECTS/WEB/web2py/gluon/dal.py", line 543, in >> close_all_instances >> db._adapter.close (action) >> File "/ home/ctx/PROJECTS/WEB/web2py/gluon/dal.py", line 523, in close >> getattr (self, action) () >> File "/ home/ctx/PROJECTS/WEB/web2py/gluon/dal.py", line 1670, in >> rollback >> if self.connection: return self.connection.rollback () >> ProgrammingError: (2014, "Commands out of sync, you can not run this >> command now") >> >> >> When this error occurs, I have to wait a while to access any other page, even >> the ticket, because it generates new tickets. >> This error is also thrown when I try to quickly update any other page >> repeatedly. This error no longer occurs only when I comment the code: >> if db (db.auth_user). isempty () >> >> But still happening with the execution of the stored procedure. >> >> Thanks... >> >> >> On Fri, Feb 22, 2013 at 12:22 AM, Massimo Di Pierro < >> massimo.dipie...@gmail.com> wrote: >> >>> Does it work if you replace >>> >>> db(db.auth_user).isempty(): >>> >>> with >>> >>> len(db(db.auth_user).select(limitby=(0,1))) >>> * >>> * >>> *This is not a solution but can help me understand. >>> * >>> >>> On Thursday, 21 February 2013 14:07:25 UTC-6, __pyslan__ wrote: >>> >>>> Sorry... >>>> >>>> The error occur on line 3 of this file: >>>> >>>> https://gist.github.com/**pyslan/5007722<https://gist.github.com/pyslan/5007722> >>>> >>>> >>>> On Thu, Feb 21, 2013 at 4:45 PM, __pyslan__ - Ayslan Jenken < >>>> ayslan...@gmail.com> 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<https://gist.github.com/pyslan/5007384> >>>>> >>>>> >>>>> Performing some research and testing, I came to the code as follows: >>>>> https://gist.github.com/**pyslan/5007364<https://gist.github.com/pyslan/5007364> >>>>> >>>>> And the stored procedures [1]: >>>>> >>>>> https://gist.github.com/**pyslan/5007439<https://gist.github.com/pyslan/5007439> >>>>> >>>>> https://gist.github.com/**pyslan/5007414<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. >>> >>> >>> >> >> > -- --- 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.