-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
index error replacement index 1 out of range for positional args tuple #142
Comments
Very informative. |
Same error here. It's a Qt project
|
@marc6h , have you checked all the issues before posting this?? |
In fact it's the same as in #128 , which was closed about a year ago. |
It seem that the text below in the *.vcproj file will cause this error: |
same here
input
cmake_converter/utils.py def make_cmake_configuration(context, sln_configuration):
""" Tries to make cmake configuration name from sln_configuration """
sln_conf_arch = sln_configuration.split('|')
genex_invalid_regex = r'[^A-Za-z0-9_]'
sln_conf_arch[0] = escape_string(context, genex_invalid_regex, sln_conf_arch[0])
# sln_conf_arch = ['Debug']
if len(sln_conf_arch) != 2:
raise ValueError(f"sln_conf_arch = {repr(sln_conf_arch)}")
# IndexError: Replacement index 1 out of range for positional args tuple
return "{}|{}".format(*sln_conf_arch) cmake_converter/visual_studio/vcxproj/parser.py def __parse_condition(self, context, attr_name, condition_value, node):
del attr_name
# condition_value = "'$(Configuration)'=='Debug'"
print(f"condition_value = {repr(condition_value)}")
# WTF? regex != parser
found = re.search(r".*=='(.*)'", condition_value)
if not found:
return
cmake_setting = make_cmake_configuration(context, found.group(1))
how hard can it be to parse these expressions? these are https://github.com/pyparsing/pyparsing/blob/master/examples/simpleBool.py i looked at 10 different vcxproj converters |
I am running the command as cmake-converter - "path.sln"
The text was updated successfully, but these errors were encountered: