somehow you are doing something like this a=db.mytable.insert(myfield='xxx') del db.mytable[a] print a.xxx ### <<< your error
The problem should only exist if the three statements happen in the same process because of transactions. On Sep 26, 3:38 am, weheh <richard_gor...@verizon.net> wrote: > File "C:\web2py\gluon\sql.py", line 1501, in __allocate > raise RuntimeError, "Using a recursive select but encountered a > broken reference" > RuntimeError: Using a recursive select but encountered a broken > reference > > I encountered this problem trying to do a select and display in the > browser, while simultaneously running a background job that updates > the db. If I refresh the browser, sometimes I get the error and > sometimes I don't. Seems like a locking problem. I am not using a cron > task. I am running a separate python web2py.py using the -S -M and -R > options.