forked from catherinedevlin/ipython-sql
-
Notifications
You must be signed in to change notification settings - Fork 77
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
ValueError: No closing quotation / Likely argument parsing issue. #954
Comments
thanks for reporting this! I believe this was introduced in version 0.10.4, when we added validation for repeated arguments @nooodle-soup can you check this? |
@edublancas On it! |
FYI this is still a bug in 0.10.16 %sql SELECT TRIM(' padded '); ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[2], [line 1](vscode-notebook-cell:?execution_count=2&line=1)
----> [1](vscode-notebook-cell:?execution_count=2&line=1) get_ipython().run_line_magic('sql', "SELECT TRIM(' padded ');")
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\IPython\core\interactiveshell.py:2480, in InteractiveShell.run_line_magic(self, magic_name, line, _stack_depth)
[2478](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/IPython/core/interactiveshell.py:2478) kwargs['local_ns'] = self.get_local_scope(stack_depth)
[2479](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/IPython/core/interactiveshell.py:2479) with self.builtin_trap:
-> [2480](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/IPython/core/interactiveshell.py:2480) result = fn(*args, **kwargs)
[2482](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/IPython/core/interactiveshell.py:2482) # The code below prevents the output from being displayed
[2483](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/IPython/core/interactiveshell.py:2483) # when using magics with decorator @output_can_be_silenced
[2484](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/IPython/core/interactiveshell.py:2484) # when the last Python token in the expression is a ';'.
[2485](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/IPython/core/interactiveshell.py:2485) if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sql\magic.py:365, in SqlMagic.execute(self, line, cell, local_ns)
[257](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:257) @no_var_expand
[258](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:258) @needs_local_scope
[259](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:259) @line_magic("sql")
(...)
[337](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:337) )
[338](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:338) def execute(self, line="", cell="", local_ns=None):
[339](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:339) """
[340](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:340) Runs SQL statement against a database, specified by
[341](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:341) SQLAlchemy connect string.
(...)
[363](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:363)
[364](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:364) """
--> [365](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:365) return self._execute(
[366](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:366) line=line, cell=cell, local_ns=local_ns, is_interactive_mode=False
[367](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:367) )
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\ploomber_core\exceptions.py:111, in modify_exceptions.<locals>.wrapper(*args, **kwargs)
[108](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/ploomber_core/exceptions.py:108) @wraps(fn)
[109](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/ploomber_core/exceptions.py:109) def wrapper(*args, **kwargs):
[110](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/ploomber_core/exceptions.py:110) try:
--> [111](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/ploomber_core/exceptions.py:111) return fn(*args, **kwargs)
[112](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/ploomber_core/exceptions.py:112) except (ValueError, TypeError) as e:
[113](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/ploomber_core/exceptions.py:113) _add_community_link(e)
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sql\magic.py:404, in SqlMagic._execute(self, line, cell, local_ns, is_interactive_mode)
[401](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:401) user_ns = self.shell.user_ns.copy()
[402](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:402) user_ns.update(local_ns)
--> [404](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:404) command = SQLCommand(self, user_ns, line, cell)
[405](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:405) # args.line: contains the line after the magic with all options removed
[407](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/magic.py:407) args = command.args
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sql\command.py:29, in SQLCommand.__init__(self, magic, user_ns, line, cell)
[26](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:26) self._line = line
[27](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:27) self._cell = cell
---> [29](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:29) self.args = parse.magic_args(
[30](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:30) magic.execute,
[31](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:31) line,
[32](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:32) "sql",
[33](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:33) allowed_duplicates=["-w", "--with", "--append", "--interact"],
[34](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:34) )
[36](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:36) # self.args.line (everything that appears after %sql/%%sql in the first line)
[37](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:37) # is split in tokens (delimited by spaces), this checks if we have one arg
[38](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/command.py:38) one_arg = len(self.args.line) == 1
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sql\parse.py:318, in magic_args(magic_execute, line, cmd_from, allowed_duplicates)
[314](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:314) """
[315](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:315) Returns the parsed arguments from the line as parsed by magic_execute
[316](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:316) """
[317](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:317) allowed_duplicates = allowed_duplicates or []
--> [318](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:318) line = without_sql_comment(parser=magic_execute.parser, line=line)
[319](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:319) arg_line, sql_line = split_args_and_sql(line)
[321](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:321) args = shlex.split(arg_line, posix=False)
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sql\parse.py:251, in without_sql_comment(parser, line)
[238](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:238) """Strips -- comment from a line
[239](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:239)
[240](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:240) The argparser unfortunately expects -- to precede an option,
(...)
[245](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:245) :type line: str
[246](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:246) """
[248](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:248) args = _option_strings_from_parser(parser)
[249](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:249) result = itertools.takewhile(
[250](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:250) lambda word: (not word.startswith("--")) or (word in args),
--> [251](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:251) shlex.split(line, posix=False),
[252](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:252) )
[253](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/dwayn/Documents/JupyterNotebooks/projects/DuckDB/jupysql_testing/~/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/sql/parse.py:253) return " ".join(result)
File C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\shlex.py:315, in split(s, comments, posix)
[313](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:313) if not comments:
[314](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:314) lex.commenters = ''
--> [315](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:315) return list(lex)
File C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\shlex.py:300, in shlex.__next__(self)
[299](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:299) def __next__(self):
--> [300](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:300) token = self.get_token()
[301](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:301) if token == self.eof:
[302](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:302) raise StopIteration
File C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\shlex.py:109, in shlex.get_token(self)
[107](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:107) return tok
[108](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:108) # No pushback. Get a token.
--> [109](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:109) raw = self.read_token()
[110](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:110) # Handle inclusions
[111](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:111) if self.source is not None:
File C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\shlex.py:191, in shlex.read_token(self)
[189](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:189) print("shlex: I see EOF in quotes state")
[190](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:190) # XXX what error should be raised here?
--> [191](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:191) raise ValueError("No closing quotation")
[192](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:192) if nextchar == self.state:
[193](file:///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/Lib/shlex.py:193) if not self.posix:
ValueError: No closing quotation
If you need help solving this issue, send us a message: https://ploomber.io/community |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happens?
Executing:
Produces a ValueError:
Executing with:
Produces the expected result:
To Reproduce
%sql SELECT TRIM(' padded ');
OS:
Windows 11
JupySQL Version:
0.10.5.dev0,
Full Name:
Dwayne McMurchy
Affiliation:
n/a
The text was updated successfully, but these errors were encountered: