Exception SystemError when using cythonized library
When I use pandarallel in cythonized .so file, I got
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./runtest.py", line 6, in
To reproduce:
- Create library.py and define any function inside which uses parallel_apply on any pandas dataframe
- Create run.py, which imports that function from library and runs. It will run normally.
- cythonize -i library.py and try to run run.py - it will fail with SystemError: unknown opcode
Environment (please complete the following information):
- OS: Linux
- Python version 3.7.3
- Cython version 0.29.21
- Pandas 1.1.1
- Pandarallel 1.5.1
Without pandarallelization, cythonized library works without exception. I am not sure its cython fault or pandarallel fault so I created reports in both projects: https://github.com/cython/cython/issues/3908
There are details from cython github comments: issue is on pandarallel side https://github.com/cython/cython/issues/3908#issuecomment-725924528 Complete code sample available at my comment https://github.com/cython/cython/issues/3908#issuecomment-725902358 there
Please share your thoughts is there really no hope to do something with this on pandarallel side? :(