Unable to open KiCad files when fields have an uneven number of quotes
Import your PCB boards to FreeCAD
Status: Beta
Brought to you by:
marmni
If a file has an uneven number of quotes, then setProjectFile() will fail to parse, and will give a truncated result. As an example, this issue was encountered where the board title was "Tomu, I'm":
(title_block (title "Tomu, I'm") (date $Id$) (company "User <user@example.com>") (comment 1 "License: CC-BY-SA 4.0 or TAPR") (comment 2 http://tomu.im) (comment 3 https://github.com/mithro/tomu) )
A workaround is to capture the text delimiter in use, and only exit "quote" mode if the delimiter matches:
txt_1 = 0 txt_delimiter = '' for i in projektBRD: if i in ['"', "'"] and txt_1 == 0: txt_1 = 1 txt_delimiter = i elif i == txt_delimiter and txt_1 == 1: txt_1 = 0
Anonymous
Hi,
I will try to check your proposition asap. If there will be no problems, I will implement it in new version.
Thanks!