-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: NoFixVersionApplicable
-
Fix Version/s: 4.4.2
-
Component/s: Configuration
-
Tags:
-
Sprint:nxDrive 11.1.29
-
Story Points:1
Error
Command line arguments:
uninstall
Exception:
Traceback (most recent call last): File "nxdrive\__main__.py", line 117, in main File "nxdrive\commandline.py", line 481, in handle File "nxdrive\commandline.py", line 392, in parse_cli File "nxdrive\commandline.py", line 433, in load_config File "configparser.py", line 696, in read File "configparser.py", line 1079, in _read configparser.MissingSectionHeaderError: File contains no section headers. file: 'C:\\Users\\Windows10\\.nuxeo-drive\\config.ini', line: 1 '[DEFAULT]\n'
Analysis
▶ file config.ini config.ini: UTF-8 Unicode (with BOM) text, with CRLF line terminators
Fix
This is a 2 steps fix:
- The config file should be opened with a specified encoding (UTF-8, always) (see https://stackoverflow.com/a/1648865/1117028).
- We should skip any errors and print a warning with the stacktrace.