I have a python application which runs perfectly on python but has an error when I run the cythonized scripts.
When I compile the scripts with cython everything compiles ok, I'm compiling on a Raspberry with Linux and running on it too.
setup.py
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules=cythonize(["*.py"]),)
Then I run the setup.sh to compile and I delete all the compiled *.py, *.c and *.pyc just to be sure that what is running is the compiled *.so files. I compile everything except my mainGUI.py it is PySide based and it always breaks while compiling.
setup.sh
sudo python3 ./setup.py build_ext --inplace
find . -name \*.py -delete
find . -name \*.c -delete
sudo rm -r ./__pycache__
sudo rm -r ./build
Then I run my app
sudo python3 mainGUI.py
And everything seems to be ok, the GUI shows up, menus are working, but when I read the terminal I get this output many times:
RecursionError: maximum recursion depth exceeded while calling a Python object
But I don't know what script.py is throwing this. I've tried leaving some scripts.py out of the compilation and letting them run as .py (for example mySQLdatabaseScript.py) and the amount of RecursionError is reduced but not eliminated.
So even when my GUI runs, and seems without error, most of my functions are not working they throw the RecursionError.
I've read that I can increase the recursion limit
sys.setrecursionlimit(1500)
But where should I do this? in the mainGUI.py? Or on each script.py?
One thing that I can see in this process is that cython is not making my application optimized on memory :/
Thanks :)