Open astrocaat opened 3 months ago
does the gtk frontend work?
yes, the frontend and its features work but it doesn't have the backdrop one so I can't test that.
Anyway the problem lies in the regex expression in re.search(). I managed to make it work by tinkering a bit with it, but I just adjusted it to my use case by understanding the syntax of my svg files.
I'm not that versed in regex exps to understand what the actual problem was though.
I'm trying adding backdrops to an icon theme I have installed. But when running the following script:
I get the following error in the console:
/home/user/Downloads/testDest/index.theme Changing svgs : 0%| | 0/994 [00:00<?, ?file/s] Changing svgs : 0%| | 0/994 [00:00<?, ?file/s] Traceback (most recent call last): File "/home/user/Development/Color-manager/script_icon.py", line 10, in <module> utils.add_backdrop(src, dest, name, color, padding, rounding) File "/home/user/Development/Color-manager/color_manager/utils.py", line 603, in add_backdrop width = int(re.search(r'<svg.*width=\"(\d*)\"', svg).group(1)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'group'