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

[BUG] SPARQL load error due to lack of escaping apostrophe ' #101

Closed
xiaokunx opened this issue Mar 30, 2021 · 8 comments
Closed

[BUG] SPARQL load error due to lack of escaping apostrophe ' #101

xiaokunx opened this issue Mar 30, 2021 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@xiaokunx
Copy link

Describe the bug
on Jupyter notebook from the Sagemaker notebook instance launched from Neptune Console UI. On notebook /Neptune/02-Visualization/Air-Routes-SPARQ.ipynb, section "Let's load some RDF Data". After choosing SPARQL and Airport from the drop down list and clicking the submit button, got following error:

Loading data set airports with language sparql
1/3:	0_nodes.txt
{
  "requestId": "0cbc40eb-51e1-eb7a-2b7f-d3544414d259",
  "code": "MalformedQueryException",
  "detailedMessage": "Malformed query: Lexical error at line 261, column 38.  Encountered: \" \" (32), after : \"Hare\""
}

I suspect that it is the processing of "O'Hare Airport" causing the error when the data loader can't handle unescaped Apostrophe "'". The same error also occurred in the EPL-SPARQL notebook when loading the Football data set where "St. Mary's Park" and "St. James Park" caused same error message. After modifying the query to triple quote """St. Mary's Park", the load worked.

@xiaokunx xiaokunx added the bug Something isn't working label Mar 30, 2021
@austinkline
Copy link
Contributor

Hi @xiaokunx, thanks for the report. Can you please provide the following info:

  1. What version of graph-notebook are you running?
  2. What type of endpoint are you connecting to? (Neptune, Blazegraph, Fuseki)

@xiaokunx
Copy link
Author

I launched the Jupyter Notebook from the AWS Console, Neptune UI, by clicking "Create Notebook". The notebook is hosted by a Sagemaker notebook instance with type "ml.t3.medium". I supposed the notebook is connected to the Neptune Reader and Writer endpoint on port 8182. The graph-notebook version I supposed is 2.0.9 via pip info.

Here are some info I get by running bash command from the jupyter notebook, hopefully useful:

%status
{'status': 'healthy',
 'startTime': 'Thu Mar 11 08:03:55 UTC 2021',
 'dbEngineVersion': '1.0.4.1.R2',
 'role': 'writer',
 'gremlin': {'version': 'tinkerpop-3.4.8'},
 'sparql': {'version': 'sparql-1.1'},
 'labMode': {'NeptuneML': 'disabled',
  'ObjectIndex': 'disabled',
  'DFEQueryEngine': 'disabled',
  'ReadWriteConflictDetection': 'enabled'}}

!echo "====python3 version:"
!python3 --version
!echo "====jupyter version:"
!jupyter --version
!echo "====which pip3 is used:"
!which pip3
!echo "====jupyter related python package version"
!pip3 freeze | grep jupyter
!echo "====graph-notebook package version"
!pip3 freeze | grep graph-notebook

====python3 version:
Python 3.6.13
====jupyter version:
jupyter core     : 4.7.1
jupyter-notebook : 5.7.10
qtconsole        : 5.0.2
ipython          : 5.8.0
ipykernel        : 5.5.0
jupyter client   : 6.1.11
jupyter lab      : 1.2.19
nbconvert        : 5.6.1
ipywidgets       : 7.6.3
nbformat         : 5.1.2
traitlets        : 4.3.3
====which pip3 is used:
/home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/pip3
====jupyter related python package version
hdijupyterutils @ file:///home/conda/feedstock_root/build_artifacts/hdijupyterutils_1612520482465/work
jupyter @ file:///home/conda/feedstock_root/build_artifacts/jupyter_1611871900595/work
jupyter-client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1610375432619/work
jupyter-console==5.2.0
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1612125253553/work
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyterlab==1.2.19
jupyterlab-git==0.11.0
jupyterlab-server==1.2.0
jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1609173350931/work
nbserverproxy @ git+https://github.com/jupyterhub/nbserverproxy@87c7bed45b7e33fcdc9bb2deb5dd77a045bae7b5
====graph-notebook package version
graph-notebook==2.0.9

I think it would be great if there is an intro on how does all those jupyter magic like %%sparql and %%seed work. There are perhaps obvious to power user by pretty cryptic to find out, i.e. how the ipython profile is loaded, and from the profile, what package or path has been imported so the jupyter could find them, how the jupyter lab extension and notebook extension are same or different, etc.

Want to say thanks a lot for this package, really make the exploration and visualization easy for first time graph database user.

@austinkline
Copy link
Contributor

Thanks for the info! Looks like you are on 2.0.9, can you try upgrading to our latest release and see if that fixes the problem? I believe that we addressed it recently (screenshot of my test run below.)

image

There are two options for upgrading your graph-notebook package when using our AWS Console offering:

  1. Stop and then Start your notebook instance from the Console
  2. Do the following:
    • Install the latest version:
      %%bash
      pip install --upgrade graph-notebook
      jupyter nbextension install --py --sys-prefix graph_notebook.widgets
      jupyter nbextension enable  --py --sys-prefix graph_notebook.widgets
      python -m graph_notebook.static_resources.install
      python -m graph_notebook.nbextensions.install
      
    • Restart your kernel and reload your browser page:
      image

When either of the two options are done, you can run the following to verify the version that is in-use by your ipython kernel:

%graph_notebook_version

Lastly, thanks for the feedback on docs, good to know where the gaps are! If you have anything specific in mind feel free to cut us an issue summarizing it. Otherwise, we'll take what you've highlighted above and see what we can do going forward.

@xiaokunx
Copy link
Author

Thanks for the prompt response. I tried both methods suggested, but neither worked.

  1. stop and start the sagemaker notebook instance. This indeed updated the graph-notebook version from 2.0.9 to 2.0.12. post1. (I wonder how that happened. Does the ipython kernel always pull from the tip of the github repo?). However, the loading airports data with SPARQL still fails with same error message. Now I read the message again, and check the exact line and column refered, it is point to the white space between O'Hare and International, not the apostrophe. so my initial guess on apostrophe maybe wrong.

  2. with 1) failed loading data, I tried running the snippet

%%bash
pip install --upgrade graph-notebook
jupyter nbextension install --py --sys-prefix graph_notebook.widgets
jupyter nbextension enable  --py --sys-prefix graph_notebook.widgets
python -m graph_notebook.static_resources.install
python -m graph_notebook.nbextensions.install

which produced some warnings:

Requirement already satisfied: graph-notebook in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (2.0.12.post1)
Requirement already satisfied: SPARQLWrapper==1.8.4 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (1.8.4)
Requirement already satisfied: gremlinpython in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (3.4.10)
Requirement already satisfied: requests in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (2.25.1)
Requirement already satisfied: widgetsnbextension in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (3.5.1)
Requirement already satisfied: ipywidgets in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (7.6.3)
Requirement already satisfied: notebook in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (5.7.10)
Requirement already satisfied: Jinja2==2.11.3 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (2.11.3)
Requirement already satisfied: networkx==2.4 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (2.4)
Requirement already satisfied: jupyter>=1.0.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (1.0.0)
Requirement already satisfied: botocore>=1.19.37 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (1.20.34)
Requirement already satisfied: tornado==4.5.3 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (4.5.3)
Requirement already satisfied: requests-aws4auth==1.0.1 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (1.0.1)
Requirement already satisfied: ipython>=7.16.1 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (7.16.1)
Requirement already satisfied: jupyter-contrib-nbextensions in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from graph-notebook) (0.5.1)
Requirement already satisfied: MarkupSafe>=0.23 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from Jinja2==2.11.3->graph-notebook) (1.1.1)
Requirement already satisfied: decorator>=4.3.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from networkx==2.4->graph-notebook) (4.4.2)
Requirement already satisfied: rdflib>=4.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from SPARQLWrapper==1.8.4->graph-notebook) (5.0.0)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from botocore>=1.19.37->graph-notebook) (1.26.4)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from botocore>=1.19.37->graph-notebook) (0.10.0)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from botocore>=1.19.37->graph-notebook) (2.8.1)
Requirement already satisfied: pickleshare in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipython>=7.16.1->graph-notebook) (0.7.5)
Requirement already satisfied: pexpect in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipython>=7.16.1->graph-notebook) (4.8.0)
Requirement already satisfied: backcall in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipython>=7.16.1->graph-notebook) (0.2.0)
Requirement already satisfied: traitlets>=4.2 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipython>=7.16.1->graph-notebook) (4.3.3)
Requirement already satisfied: pygments in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipython>=7.16.1->graph-notebook) (2.8.1)
Requirement already satisfied: setuptools>=18.5 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipython>=7.16.1->graph-notebook) (49.6.0.post20210108)
Requirement already satisfied: jedi>=0.10 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipython>=7.16.1->graph-notebook) (0.18.0)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipython>=7.16.1->graph-notebook) (3.0.18)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jedi>=0.10->ipython>=7.16.1->graph-notebook) (0.8.2)
Requirement already satisfied: jupyter-console in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter>=1.0.0->graph-notebook) (6.4.0)
Requirement already satisfied: nbconvert in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter>=1.0.0->graph-notebook) (5.6.1)
Requirement already satisfied: qtconsole in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter>=1.0.0->graph-notebook) (5.0.3)
Requirement already satisfied: ipykernel in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter>=1.0.0->graph-notebook) (5.5.0)
Requirement already satisfied: wcwidth in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=7.16.1->graph-notebook) (0.2.5)
Requirement already satisfied: six>=1.5 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from python-dateutil<3.0.0,>=2.1->botocore>=1.19.37->graph-notebook) (1.15.0)
Requirement already satisfied: pyparsing in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from rdflib>=4.0->SPARQLWrapper==1.8.4->graph-notebook) (2.4.7)
Requirement already satisfied: isodate in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from rdflib>=4.0->SPARQLWrapper==1.8.4->graph-notebook) (0.6.0)
Requirement already satisfied: ipython-genutils in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from traitlets>=4.2->ipython>=7.16.1->graph-notebook) (0.2.0)
Requirement already satisfied: aenum<3.0.0,>=1.4.5 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from gremlinpython->graph-notebook) (2.2.6)
Requirement already satisfied: jupyter-client in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipykernel->jupyter>=1.0.0->graph-notebook) (6.1.12)
Requirement already satisfied: nbformat>=4.2.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipywidgets->graph-notebook) (5.1.2)
Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from ipywidgets->graph-notebook) (1.0.0)
Requirement already satisfied: jupyter-core in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from nbformat>=4.2.0->ipywidgets->graph-notebook) (4.7.1)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from nbformat>=4.2.0->ipywidgets->graph-notebook) (3.2.0)
Requirement already satisfied: attrs>=17.4.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->graph-notebook) (20.3.0)
Requirement already satisfied: importlib-metadata in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->graph-notebook) (3.7.3)
Requirement already satisfied: pyrsistent>=0.14.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->graph-notebook) (0.17.3)
Requirement already satisfied: terminado>=0.8.1 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from notebook->graph-notebook) (0.9.3)
Requirement already satisfied: Send2Trash in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from notebook->graph-notebook) (1.5.0)
Requirement already satisfied: prometheus-client in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from notebook->graph-notebook) (0.9.0)
Requirement already satisfied: pyzmq>=17 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from notebook->graph-notebook) (22.0.3)
Requirement already satisfied: testpath in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from nbconvert->jupyter>=1.0.0->graph-notebook) (0.4.4)
Requirement already satisfied: pandocfilters>=1.4.1 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from nbconvert->jupyter>=1.0.0->graph-notebook) (1.4.2)
Requirement already satisfied: entrypoints>=0.2.2 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from nbconvert->jupyter>=1.0.0->graph-notebook) (0.3)
Requirement already satisfied: defusedxml in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from nbconvert->jupyter>=1.0.0->graph-notebook) (0.7.1)
Requirement already satisfied: mistune<2,>=0.8.1 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from nbconvert->jupyter>=1.0.0->graph-notebook) (0.8.4)
Requirement already satisfied: bleach in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from nbconvert->jupyter>=1.0.0->graph-notebook) (3.3.0)
Requirement already satisfied: ptyprocess in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from terminado>=0.8.1->notebook->graph-notebook) (0.7.0)
Requirement already satisfied: webencodings in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from bleach->nbconvert->jupyter>=1.0.0->graph-notebook) (0.5.1)
Requirement already satisfied: packaging in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from bleach->nbconvert->jupyter>=1.0.0->graph-notebook) (20.9)
Requirement already satisfied: typing-extensions>=3.6.4 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from importlib-metadata->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->graph-notebook) (3.7.4.3)
Requirement already satisfied: zipp>=0.5 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from importlib-metadata->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->graph-notebook) (3.4.1)
Requirement already satisfied: jupyter-highlight-selected-word>=0.1.1 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter-contrib-nbextensions->graph-notebook) (0.2.0)
Requirement already satisfied: jupyter-latex-envs>=1.3.8 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter-contrib-nbextensions->graph-notebook) (1.4.6)
Requirement already satisfied: jupyter-nbextensions-configurator>=0.4.0 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter-contrib-nbextensions->graph-notebook) (0.4.1)
Requirement already satisfied: jupyter-contrib-core>=0.3.3 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter-contrib-nbextensions->graph-notebook) (0.3.3)
Requirement already satisfied: lxml in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter-contrib-nbextensions->graph-notebook) (4.6.3)
Requirement already satisfied: pyyaml in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from jupyter-contrib-nbextensions->graph-notebook) (5.4.1)
Requirement already satisfied: qtpy in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from qtconsole->jupyter>=1.0.0->graph-notebook) (1.9.0)
Requirement already satisfied: certifi>=2017.4.17 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from requests->graph-notebook) (2020.12.5)
Requirement already satisfied: idna<3,>=2.5 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from requests->graph-notebook) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages (from requests->graph-notebook) (4.0.0)
copying file datatables.css to /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/notebook/static
copying file datatables.js to /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/notebook/static

**Config option `kernel_spec_manager_class` not recognized by `InstallNBExtensionApp`.**
Installing /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/widgets/nbextension/static -> graph_notebook_widgets
Up to date: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/graph_notebook_widgets/__init__.py
Up to date: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/graph_notebook_widgets/index.js
Up to date: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/graph_notebook_widgets/extension.js
Up to date: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/graph_notebook_widgets/__pycache__/__init__.cpython-36.pyc
- Validating: OK

    To initialize this nbextension in the browser every time the notebook (or other app) loads:
    
          jupyter nbextension enable graph_notebook.widgets --py --sys-prefix
    
Config option `kernel_spec_manager_class` not recognized by `EnableNBExtensionApp`.
Enabling notebook extension graph_notebook_widgets/extension...
      - Validating: OK
Config option `kernel_spec_manager_class` not recognized by `InstallNBExtensionApp`.
Installing /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/gremlin_syntax/static -> gremlin_syntax
Removing: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/gremlin_syntax
Making directory: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/gremlin_syntax/
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/gremlin_syntax/static/__init__.py -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/gremlin_syntax/__init__.py
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/gremlin_syntax/static/description.yaml -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/gremlin_syntax/description.yaml
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/gremlin_syntax/static/README.md -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/gremlin_syntax/README.md
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/gremlin_syntax/static/main.js -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/gremlin_syntax/main.js
Making directory: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/gremlin_syntax/__pycache__
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/gremlin_syntax/static/__pycache__/__init__.cpython-36.pyc -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/gremlin_syntax/__pycache__/__init__.cpython-36.pyc
- Validating: OK
Installing /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/sparql_syntax/static -> sparql_syntax
Removing: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/sparql_syntax
Making directory: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/sparql_syntax/
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/sparql_syntax/static/__init__.py -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/sparql_syntax/__init__.py
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/sparql_syntax/static/description.yaml -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/sparql_syntax/description.yaml
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/sparql_syntax/static/README.md -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/sparql_syntax/README.md
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/sparql_syntax/static/main.js -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/sparql_syntax/main.js
Making directory: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/sparql_syntax/__pycache__
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/sparql_syntax/static/__pycache__/__init__.cpython-36.pyc -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/sparql_syntax/__pycache__/__init__.cpython-36.pyc
- Validating: OK
Installing /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/neptune_menu/static -> neptune_menu
Removing: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/neptune_menu
Making directory: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/neptune_menu/
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/neptune_menu/static/__init__.py -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/neptune_menu/__init__.py
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/neptune_menu/static/description.yaml -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/neptune_menu/description.yaml
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/neptune_menu/static/README.md -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/neptune_menu/README.md
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/neptune_menu/static/main.js -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/neptune_menu/main.js
Making directory: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/neptune_menu/__pycache__
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/neptune_menu/static/__pycache__/__init__.cpython-36.pyc -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/neptune_menu/__pycache__/__init__.cpython-36.pyc
- Validating: OK
Installing /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/playable_cells/static -> playable_cells
Removing: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells
Making directory: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells/
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/playable_cells/static/__init__.py -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells/__init__.py
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/playable_cells/static/description.yaml -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells/description.yaml
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/playable_cells/static/README.md -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells/README.md
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/playable_cells/static/main.js -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells/main.js
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/playable_cells/static/playable_cells.css -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells/playable_cells.css
Making directory: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells/__pycache__
Copying: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.6/site-packages/graph_notebook/nbextensions/playable_cells/static/__pycache__/__init__.cpython-36.pyc -> /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/nbextensions/playable_cells/__pycache__/__init__.cpython-36.pyc
- Validating: OK

    To initialize this nbextension in the browser every time the notebook (or other app) loads:
    
          jupyter nbextension enable graph_notebook.nbextensions --py --sys-prefix
    
Config option `kernel_spec_manager_class` **not recognized by** `EnableNBExtensionApp`.
Enabling notebook extension gremlin_syntax/main...
      - Validating: OK
Enabling notebook extension sparql_syntax/main...
      - Validating: OK
Enabling notebook extension neptune_menu/main...
      - Validating: OK
Enabling notebook extension playable_cells/main...
      - Validating: OK

Now running the line magic %seed yield UsageError: Line magic function %seed not found. I guess it is caused by some configuration issues? Tried restart the kernel a few times but errors persist.

So I restarted browser, went to the notebook again, now magic works. but loading the airpot data leads to same error. Behind the scene, I wonder how does this repo in general handel the special chars in the data file and/or queries? Stackoverflow (e.g. https://stackoverflow.com/questions/55970745/how-to-handle-apostrophe-in-sparql) suggestd some excaping methods which works in my attempt.

@austinkline
Copy link
Contributor

I'll have to take some time to reproduce this on my end since upgrading didn't seem to make a difference. I'll check back in after a few days

@austinkline
Copy link
Contributor

Was able to reproduce on Neptune on a fresh IAM cluster:
image

Seems like this issue doesn't manifest itself when we are running Neptune without IAM auth. Will continue to investigate.

@austinkline
Copy link
Contributor

Based on some local testing, looks like an outstanding PR will fix this issue:
#104

Once that is merged in we will revisit this

@austinkline
Copy link
Contributor

Circling back to this, I created a fresh neptune cluster with our latest release and was able to successfully use our %seed command for the airports dataset. Closing this but feel free to reopen if you run into this issue again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants