Closed mnefstead closed 4 years ago
Haha, interesting.
The globs do work with the forward slashes: glob('Character/Classes/*/*.xml')
,
but the paths of the returned files do have backslashes 😖 maybe they can be converted to have forward slashes, or we should use pathlib..
I'm getting the following error when I try to run the script with Python 3.8:
File "create_compendiums.py", line 263, in create_class_compendiums
class_name, subclass_name = re.search(r"/([^/]+)/([^/]+)\.xml$", file).groups()
AttributeError: 'NoneType' object has no attribute 'groups'
Arguments were
-b complete -s usable -e MF HB IL
. The same thing happened with reference, and without the exclusions, and with both the master and beta branches.I'm afraid I don't know enough about regular expressions to troubleshoot this error. I'd appreciate any suggestions!
Edit: solved this issue. For a windows file system (which uses backslashes instead of forward slashes), it seems the line in question must be replaced with the following:
class_name, subclass_name = re.search(r"\\([^/]+)\\([^/]+)\.xml$", file).groups()