Francesc Alted <faltet <at> pytables.org> writes:

> > I'm getting the following error:
> > 
> >   File "D:\python\prod_tests\src\test_receivers.py", line 54, in <module>
> >     check_receivers(path_r,1)
> >   File "D:\python\prod_tests\src\test_receivers.py", line 45, in
> >  check_receivers for row in ro_detector.where('completo <= 20000'):
> >   File "C:\Python26\lib\site-packages\tables\table.py", line 1210, in where
> >     return self._where(condition, condvars, start, stop, step)
> >   File "C:\Python26\lib\site-packages\tables\table.py", line 1226, in
> >  _where condvars = self._requiredExprVars(condition, condvars, depth=3)
> >  File "C:\Python26\lib\site-packages\tables\table.py", line 977, in
> >  _requiredExprVars
> >     user_locals = user_frame.f_locals
> >   File "C:\Python26\lib\site-packages\psyco\support.py", line 124, in
> > __getattr__
> >     raise AttributeError, ("local variables of functions run by Psyco "
> > AttributeError: local variables of functions run by Psyco cannot be
> > accessed in any way, sorry
> > Closing remaining open files: temp.h5... done


I have gotten similar errors while using psyco. As far as I can tell the problem
is a conflict between psyco and the Table.where() method. 

One solution is to separate the where() statements from the rest of your code by
putting them in a function. You can then use psyco.bind() to speedup any
functions that do not contain a call to where().

Cheers,
Andrew


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to