Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash on Python 3.11.2 due to wrong quoting #16

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

git-developer
Copy link

Fixes:

# DISPLAY=:0 ./sc-controller-v0.4.8.20-1-bookworm-x86_64.AppImage
Traceback (most recent call last):
  File "/tmp/.mount_sc-conqJTlym/usr/bin/sc-controller", line 27, in <module>
    from scc.gui.app import App
  File "/tmp/.mount_sc-conqJTlym/usr/lib/python/scc/gui/app.py", line 13, in <module>
    from scc.gui.controller_image import ControllerImage
  File "/tmp/.mount_sc-conqJTlym/usr/lib/python/scc/gui/controller_image.py", line 96
    self.set_image(os.path.join(self.app.imagepath, f"controller-images/{self.current["gui"]["background"]}.svg"))
                                                                                       ^^^
SyntaxError: f-string: unmatched '['

Fixes a crash using python 3.11.2
@C0rn3j
Copy link
Owner

C0rn3j commented Sep 7, 2024

Ah, I might have actually done that elsewhere too, where I converted to f-strings, as my tooling is set up for 3.12+, whoops.

Thanks!

On a related note, I declared 3.9 as minimum (non-EOL versions only, 3.8 is dead next month) in the README so it doesn't just say 3.

I do wonder if the current code would actually run on 3.9, as I tend to add modern typing features where I can, to make the code saner.

@C0rn3j C0rn3j merged commit 3291bf7 into C0rn3j:python3 Sep 7, 2024
1 check passed
@git-developer
Copy link
Author

Just for the record:

  • Ubuntu Focal: Python 3.8
  • Debian Bullseye: Python 3.9
  • Ubuntu Jammy: Python 3.10
  • Debian Bookworm: Python 3.11

@git-developer git-developer deleted the fix/quoting branch September 7, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants