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
Saving macro fails with NameError: name 'fnSuffix' is not defined #1280
Comments
Thanks for the bug report @fatherofinvention! =) Should be fixed, now. |
I am still getting the same error message as OP. Ctrl+E (error-recent) shows error was activated in line 39 of macros.py In macros.py (line 39), But in cmdlog.py (line 42), Could that be the problem? File "/Users/code86/opt/miniconda3/envs/env2/lib/python3.8/site-packages/visidata/macros.py", line 39, in saveMacro |
Hi @code86! I should have been clearer in the message. This bug was fixed on the I am not sure how to use Some additional technical info:
Yup! That was the problem. Execstrings in VisiData ( |
Thank you, @anjakefala! |
Small description
When saving a recorded macro error NameError: name 'fnSuffix' is not defined is printed to the screen no matter what is entered as a keystroke. I have tried single characters, numbers, and strings, including keyboard modifiers and omiting them, but none of those combinations work.
Actual result with screenshot
Traceback (most recent call last): File "/opt/homebrew/Cellar/visidata/2.8/libexec/lib/python3.9/site-packages/visidata/basesheet.py", line 167, in execCommand escaped = super().execCommand2(cmd, vdglobals=vdglobals) File "/opt/homebrew/Cellar/visidata/2.8/libexec/lib/python3.9/site-packages/visidata/basesheet.py", line 69, in execCommand2 exec(code, vdglobals, LazyChainMap(vd, self)) File "macro-record", line 1, in <module> import plugins.dedupe File "/opt/homebrew/Cellar/visidata/2.8/libexec/lib/python3.9/site-packages/visidata/macros.py", line 60, in startMacro vd.cmdlog.saveMacro(vd.macroMode.rows, ks) File "/opt/homebrew/Cellar/visidata/2.8/libexec/lib/python3.9/site-packages/visidata/macros.py", line 39, in saveMacro macropath = Path(fnSuffix(options.visidata_dir+"macro")) NameError: name 'fnSuffix' is not defined
Steps to reproduce with sample data and a .vd
Additional context
Visidata version: 2.8
MacOS version: 12.2
Python version: 3.9.10
The text was updated successfully, but these errors were encountered: