Open jurajjasik opened 3 years ago
@jurajjasik That's interesting. Yeah, I guess I just assumed that the ini
files would comply with ConfigParser
, and they have for me and our group for multiple (10+) XPSes for many (10+) years.
But I guess that isn't necessarily going to always work. I'll add your suggested fix, and hope that will be enough. Thanks!
Hello, I found an issue with parsing factory provided
system.ini
file from XPS-C:After debugging, I found that problem is in leading white character in
[section]
header line. Such line is not processed correctly withConfigParser
. To be honest, I am not sure if white characters before section are allowed in standart .ini files but possible workaround is to remove white characters from lines before parsing usingstrip()
function. Thus replace code: https://github.com/pyepics/newportxps/blob/4713dcc693bd7dc5bd91ff4f456f3f0c8cd1306a/newportxps/newportxps.py#L173 with:Best, Juraj