-
Notifications
You must be signed in to change notification settings - Fork 76
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
confusing error when executing %sqlcmd
#262
Comments
Request to assign this issue (#262) |
Hi Ido/ Eduardo, I would like to know the control flow of the above command '%sqlcmd'. I have forked the repo and created a new branch 'dev-262'. I changed the file magic_cmd.py to debug the issue. The issue occurs at line 44. So after line 43, I added some print statements to check the split of the line argument. However, when I committed the file and tried to install the repo as a pip package using: (pip install git+https://github.com/raghavSharmaCode/jupysql.git@dev-262) It did not reflect the changes that I was expecting when I ran the '%sqlcmd' command in a test .ipynb file. |
Hence I would like to learn about the OOPS implementation of this package so that we are able to debug and resolve the issue on a low-level design basis. |
did you setup with the
This will install JupySQL in editable mode, meaning all changes should reflect (if you're using Jupyter, you need to enable autoreload or restart the kernel, though) To check if JupySQL is correctly installed in the current environment: In [1]: import sql; sql
Out[1]: <module 'sql' from '/Users/eduardo/dev/jupysql/src/sql/__init__.py'> You can see that |
Hi Eduardo, Please confirm if the below image explains what you asked for. The latest code is in the dev-262 repo. Please confirm if I should raise a pull request for you to verify. Thanks and regards, |
Looks good! Some feebdback: If the user passes
The error should say:
If they pass a wrong argument:
The error should say:
|
As requested, Also, I would like to know the significance of the default line argument as an empty string. An empty string is a use case but how much is it relevant as the default argument? I will be raising a pull request for you to verify the changes. Looking forward to your response. Best, |
for reference, the PR is: #271 |
When executing
%sqlcmd
, I get this:But the error is unclear. Instead, we should throw an UsageError and tell the user what are the available commands, along with some examples
The text was updated successfully, but these errors were encountered: