Fix Module Import Issue in preprocess.py for Enhanced Compatibility#4
Fix Module Import Issue in preprocess.py for Enhanced Compatibility#4hoon-ock wants to merge 5 commits into
Conversation
|
Thank you for making this contribution. I agree, this approach is more flexible, and allows the script to be run from any directory. I don't see any issues with this change. However, there are a number of other scripts in the Since there are a number of scripts that need to be updated, perhaps we can create a and then call |
| import os | ||
| import sys | ||
| sys.path.append(".") | ||
| # sys.path.append(".") |
There was a problem hiding this comment.
This commented line can be deleted.
|
I raised an issue related to |
|
I agree with @kianpu34593 that installing |
Changes Made
sys.pathwithinpreprocess.pyto dynamically include the path to thecrystallmmodule. This change resolves theModuleNotFoundErrorby ensuring Python can locate and importcrystallmregardless of the current working directory.Rationale
The
preprocess.pyscript previously assumed a specific working directory for successful module importation. This assumption could lead to execution errors when the script was run from a different directory, limiting its flexibility and usability. By dynamically adjusting thesys.path, we cater to a broader range of use cases, making the script more robust and user-friendly.I welcome feedback on this change, particularly regarding:
Thank you for considering this contribution.