From 19b40095d8f8e0ee0a8ac88ca20f3238ab2a611d Mon Sep 17 00:00:00 2001 From: Yuwen Heng <15895948+heng-yuwen@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:52:45 +0800 Subject: [PATCH] Update pypcd.py Fix ValueError: field '__0000' occurs more than once --- pypcd/pypcd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pypcd/pypcd.py b/pypcd/pypcd.py index 93f58e8..db0fb52 100644 --- a/pypcd/pypcd.py +++ b/pypcd/pypcd.py @@ -77,6 +77,8 @@ def parse_header(lines): for ln in lines: if ln.startswith('#') or len(ln) < 2: continue + ln = ln.replace('_','s',1) + ln = ln.replace('_','m',1) match = re.match('(\w+)\s+([\w\s\.]+)', ln) if not match: warnings.warn("warning: can't understand line: %s" % ln)