Skip to content
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

Conversion of old input files into Excel format has a bug #81

Closed
FLomb opened this issue Sep 6, 2023 · 1 comment · Fixed by #102
Closed

Conversion of old input files into Excel format has a bug #81

FLomb opened this issue Sep 6, 2023 · 1 comment · Fixed by #102
Assignees
Labels
bug Something isn't working

Comments

@FLomb
Copy link
Contributor

FLomb commented Sep 6, 2023

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.

@FLomb FLomb added the bug Something isn't working label Sep 6, 2023
@Bachibouzouk
Copy link
Collaborator

I will have a look at it and can open a PR for this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants