Closed mfojtak closed 1 year ago
Hi, Thanks for your feedback. The bug comes from Cython and can be corrected by an upgrade of numpy: https://stackoverflow.com/questions/72202926/during-debugging-pandas-gave-an-error-typeerror-nonetype-object-is-not-cal This is now on the Develop branch and will be available in the next release.
The problem persists in 0.30 The numpy issue has been fixed about a year ago.
What is the proper solution? Currently I have to maintain own version of scikit-network with the cython: linetrace=True line removed.
OK, I've upgraded cython to 0.29.30, as recommanded by @QLutz (thanks). This should work now (on the develop branch). Thanks for the feedback.
That did not solve the problem. Tried multiple cython versions with no luck. Removing cython: linetrace=True is the only solution at the moment. Is this line necessary?
Yes, it is necessary to run code coverage tools. We'll dig further. Thanks.
I added on the relevant Cython issue (note also the related PR) that is open but stale. I have little hope that something will come out of it.
In the meanwhile you may try the fix referenced in the SO thread linked by @tbonald, i.e. building from source (possibly at some cost in terms of performance):
CFLAGS="-DCYTHON_FAST_PYCALL=0" pip install --force-reinstall --no-binary numpy,scikit-network scikit-network numpy scipy
although, I doubt it would work in this case.
The problematic line removal is still the only solution at the moment.
Would it be possible to remove the line using if statement based on env-variable or compiler switch? You can then use the line if needed for codecov tools and remove the line when compiling the final production pip package.
Good suggestion! We'll explore this, thanks.
Description
The presence of cython: linetrace=True in .pyx files causes TypeError: 'NoneType' object is not callable error when running in debug mode on VS Code.
What I Did