json2cmake
json2cmake copied to clipboard
TypeError: 'set' object is not subscriptable
Ubuntu 20.04.3 LTS Python 3.8.10
json2cmake generates the following error
Traceback (most recent call last):
File "/home/jk2/.local/bin/json2cmake", line 8, in
edit /home/jk2/.local/lib/python3.8/site-packages/json2cmake/init.py
modify
name = os.path.basename(os.path.commonprefix(list(files)).rstrip("/_"))
Looks like the author has not been active since 2021, but I submitted a pull request with this modification anyway.
Awesome. Thank you. This fixes the same crash on MacOS, too.
It then bombed out on directories with spaces in names, but this is far, far from the first program with that issue. That's further than I'd hoped to get extracting an ESP32 build from PlatformIO and trying to shove it into Cmake.