ooflet / Mi-Create

Unofficial watchface creator for Xiaomi wearables ~2021 and above
https://ooflet.github.io/docs
GNU General Public License v3.0
34 stars 4 forks source link

SyntaxError in f-string when starting software #18

Closed DeeDee22 closed 2 months ago

DeeDee22 commented 2 months ago

**Describe the bug When trying to start the program I get the following error:

File "/home/xyz/Mi-Create/src/main.py", line 963 item.setProperty("widget_name", f"{item.getProperty("widget_name")}{name_suffix}{count}") SyntaxError: f-string: unmatched '('

To Reproduce Steps to reproduce the behavior: I started from source.

Expected behavior The software starts.

Desktop (please complete the following information):

Additional context The problem seems to be the double quotes around the second occurence of "widget_name". When I replaced them with single quotes it worked.

ooflet commented 2 months ago

I use Python 3.12 which allows for double quotes in f strings, so issues like these that impact older versions usually slip out unnoticed. I'd suggest updating Python to 3.12 (I'm not sure if 3.12 is available in Ubuntu's repos), however I'll keep this in mind next time. Fixed in 8c7a548

DeeDee22 commented 2 months ago

oh, yeah, makes sense. minor issue, but maybe update the min. python version in the readme :-)