-
Notifications
You must be signed in to change notification settings - Fork 230
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
Modification of pyrms import when debugging #2363
Comments
I have a pull request open right now that is semi-related to this issues (#2359) because the ignored import-related exception is not best practice. A couple notes on this:
I think that the exception that is actually getting caught here is not always a
I would be curious to see how this interacts with the As far as the full solution goes, I think it would be better to fix the underlying issue ( |
Hi @JacksonBurns. Your PR doesn't really deal with the core of this ticket's issue. Yes, there is not always a ModuleNotFoundError. ModuleNotFoundError only occurs when the user is running RMG in debug mode (aka calling Furthermore, my issue isn't related to running a unittest. I am not running unittests and I assume if a person is running a test they should have Julia/PyJulia/PyCall/RMS all correctly configured. I am literally running my IDE in debug mode to try catch another error. Also, as I mentioned, I believe creating a system image of RMS would be beneficial, even just for debugging because it saves an enormous amount of time. However, please note, if RMS is compiled into a system image and then in the far future someone decides to update RMS, the compiled system image will need to be recompiled. |
When I was originally working with pyjulia it was quite difficult to build those system images...but it looks a lot easier now. It seems to me that we could potentially update the system images during the |
This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days. |
Motivation or Problem
When VSCode/PyCharm are being used to debug RMG-Py, the execution of the code during the debug process will suddenly stop without reporting the exception. The exception will only be reported if the user ticks the 'User Uncaught Exceptions'/'Raise Exceptions' in the 'BREAKPOINTS' section. The issue is that during the debugging process there is a few lines of code it fails
File: reactors.py
The reported error is 'ModuleNotFoundError' for 'pyrms'
Desired Solution
This error can be rectified a couple of ways:
*.sys
file. This will improve the load time of RMS. However, it will require updating PyJulia to version 0.6.0 (right now RMG uses PyJulia - 0.5.3)python -m julia.sysimage sys.so
Now assuming the system image, named
sys.so
(can be changed of course), has been created - then changes to importing Jula from julia.api will be required.Full Solution
The text was updated successfully, but these errors were encountered: