Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

setup.py - SyntaxError: f-string: unmatched '[' #1

Description

@MegaMickPt

Hi there!
Python 3.11.4 - When running the Python setup.py script I got this error:

  File "C:\GitRepos\Asteroid-Mapper\setup.py", line 171
    f"{drive}\\steamapps\\common\\{manifest["AppState"]["installdir"]}"
                                             ^^^^^^^^
SyntaxError: f-string: unmatched '['

Replacing the outer double-quotes (") with the single ones (') fixed it.

And the same happened here:

  File "C:\GitRepos\Asteroid-Mapper\setup.py", line 210
    print(f"Found Space Engineers Under {locations["244850"]}")
                                                    ^^^^^^
SyntaxError: f-string: unmatched '['

After changing the outer double quotes here also to single, like print(f' instead of print(f", everything else worked fine.

I don't know much of Python, maybe it's the quotes are indeed wrong or maybe it's something with the Python version or how it's setup, but thought I'd let you know that yeah the double-quotes were not getting escaped correctly. Curiously, VS Code didn't think the syntax was wrong or anything.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions