You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Input files in Python format require conversion into Excel format via the ramp_convert_old_input_files.py script. However, such a script only works for the three pre-defined example input files.
More precisely, line 82 of the script checks whether the file to be converted has "ramp" as part of its name; if not, "ramp." gets added before the file name. Then, in line 84, the file gets imported as a module: file_module = importlib.import_module(fname).
The result is that when the file name mirrors one of the pre-defined example files (e.g., "input_file_1.py"), this gets erroneously converted into the pre-defined input file embedded in the code, bypassing any changes made to the local file. When, instead, the file name has nothing to do with the pre-defined input files, the code produces an error due to being unable to find and import a module named "ramp.some_random_file_name".
I have solved the issue by commenting out lines 82 and 83 of the ramp_convert_old_input_files.py script. This way, the file name gets always read as-is, without adding "ramp." in front and trying to use any pre-defined file in the code. If @Bachibouzouk confirms this is the ideal fix, I will open a PR.
The text was updated successfully, but these errors were encountered:
Input files in Python format require conversion into Excel format via the
ramp_convert_old_input_files.py
script. However, such a script only works for the three pre-defined example input files.More precisely, line 82 of the script checks whether the file to be converted has "ramp" as part of its name; if not, "ramp." gets added before the file name. Then, in line 84, the file gets imported as a module:
file_module = importlib.import_module(fname)
.The result is that when the file name mirrors one of the pre-defined example files (e.g., "input_file_1.py"), this gets erroneously converted into the pre-defined input file embedded in the code, bypassing any changes made to the local file. When, instead, the file name has nothing to do with the pre-defined input files, the code produces an error due to being unable to find and import a module named "ramp.some_random_file_name".
I have solved the issue by commenting out lines 82 and 83 of the
ramp_convert_old_input_files.py
script. This way, the file name gets always read as-is, without adding "ramp." in front and trying to use any pre-defined file in the code. If @Bachibouzouk confirms this is the ideal fix, I will open a PR.The text was updated successfully, but these errors were encountered: