-
Notifications
You must be signed in to change notification settings - Fork 267
Problem with debugging in Pycharm #821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, @jirkacigler! Can you please provide the code which is creating the error? Also, what happens if you run the code not using PyCharm, from the command line, for example? |
Debugging crashes on importing of Model For example in pdb, debugging works. But in Pycharm, it fails. This is the complete error output. ` File "C:\Program Files\JetBrains\PyCharm 2022.2.4\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile |
So some minor thoughts:
|
I'm having a similar issue on import of Model, except I'm using VIsual Studio Code on Windows 11 with debugpy to debug. Running the file directly from python in the terminal, with no debugger attaching, works as expected. |
I have the same problem, just open a py file and write the following one-line code |
I'm facing the same issue using the Spyder IDE. OS: Win 11 When trying to run in debug I get the following error: File ~\AppData\Local\anaconda3\Lib\site-packages\spyder_kernels\customize\spyderpdb.py:900 in run File ~\AppData\Local\anaconda3\Lib\bdb.py:600 in run
File src\pyscipopt\scip.pxi:1004 in pyscipopt.scip.Model.init TypeError: 'NoneType' object is not callable |
I encounter the same error OS: macOS (ARM) Furthermore, I used conda to install the relevant dependencies Reproducible example:
This is the produced error:
Please let me know whether there are further details needed to reproduce the error. |
here is my environment: my code is
I have installed I have tried PySCIPOpt-4.4.0, it has the same question. |
I have the same problem in VSCODE |
Anyone has solutions up to now? |
@mmghannam is looking into it. I'm also trying to get the next release in order across all platforms, and maybe when that is done then this issue will just resolve itself. (Would not get too hopeful for that though) |
I also think that the issues are probably related to a problem with an old Cython version (similar to the one in pandas-dev/pandas#47429). We recently updated to Cython 3, and I couldn't reproduce the buggy behavior on the master branch. This should be fixed in the next release. For now, I suggest manually installing pyscipopt following the instructions in here. Hope this helps! |
Can anyone please verify if this issue still persists for the version |
I'm seeing exactly the same error using PyCharm on a MacBook running OS 13.6.7. When I run in debug mode I see this error:
File "complex.pxd", line 19, in init pyscipopt.scip I think the problem is related to this comment I found in the code where if fails: This is in the file: /PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py on line 17 But how do I do that pre-compile and what do I compile? |
Yes, still persists |
I will look into this with @mmghannam next week. Sorry for this taking so long. We are a bit lost, and it's not trivial to recreate this error with the computers we have. |
Building PyScipOpt from source works for newest version (5.0.1, cython 3.10), however the version in pip repository does not work. |
I and @Opt-Mucca looked into it, and we think the problem was caused from compiling Cython with line tracing enabled (used to compute test coverage). I'm not sure why that caused problems with debugging but we disabled it in the latest release Could you please check again if the problem still persists in the latest release? |
I tried it out, and 5.1.1 works fine in VSCode. |
Describe the bug
After upgrading SCIPOptimization suite to 9.0.0 and pyscipopt to 5.0.0., it is not possible to use the same code in debug mode in Pycharm.
Impor of pyscipopt.Model fails with error code
To Reproduce
same error on different win 11 machines
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
from pyscipopt.scip import Model File "complex.pxd", line 19, in init pyscipopt.scip File "src\\pyscipopt\\scip.pyx", line 19, in __Pyx_PyMODINIT_FUNC PyInit_scip(void) TypeError: 'NoneType' object is not callable python-BaseException
System
pyscipopt
? based on https://github.com/scipopt/PySCIPOpt/blob/master/INSTALL.md, using pipAdditional context
nothing
The text was updated successfully, but these errors were encountered: