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

SyntaxError: invalid syntax #1

Open
pauldrt97 opened this issue Mar 21, 2024 · 1 comment
Open

SyntaxError: invalid syntax #1

pauldrt97 opened this issue Mar 21, 2024 · 1 comment

Comments

@pauldrt97
Copy link

I am getting a syntax when trying to run the script in Notepad++

File "C:\Program Files\Notepad++\plugins\PythonScript\scripts\excel_grepper_npp-main\grep_in_excel.py", line 66
logging.debug(f'{cell_address = }, {celltype = }, {formula_text = }')
^
SyntaxError: invalid syntax

@molsonkiko
Copy link
Owner

molsonkiko commented Mar 21, 2024

Are you using PythonScript version 2? You need to use at least version 3 of PythonScript for this script to work.

The most likely cause of your SyntaxError is the f-string (f'{cell_address = }, {celltype = }, {formula_text = }'), which is not valid Python 2 syntax.

I have no intention of changing the script to use Python 2-compatible syntax, because I doubt I could get the script to work in Python 2 even if I made those changes.

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

No branches or pull requests

2 participants