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

Fix for custom config file command line argument TypeError bug #93

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

SysError956
Copy link

Fixing a bug with the custom config file command line argument (-c). Using the -c command line argument (python mumc.py -c "./config/mumc_config.yaml") would trigger a TypeError exception: unsupported operand type(s) for /: 'str' and 'str'

The custom config file logic was using a combination of string concatenation with "/" between path and filename, as well as the / operator, which is the source of the bug. This is because the / operator is not support on str, but was instead meant to be used on Path objects from pathlib (which works fine with the default non-custom config file logic and init_dict['mumc_path'] because it is a Path object).

The bug fixed by converting the custom config file directory (cmdopt_dict['altConfigPath']) from str to Path and only using the / operator in the custom config file logic.

@terrelsa13 terrelsa13 merged commit 11535a1 into terrelsa13:MUMC-Latest Nov 5, 2023
1 check passed
terrelsa13 added a commit that referenced this pull request Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants