jupyrdf / ipyradiant

Jupyter widgets for working with RDF graphs.
BSD 3-Clause "New" or "Revised" License
5 stars 7 forks source link

import problem in jupyter #122

Closed djangoliv closed 2 years ago

djangoliv commented 2 years ago

At import I have this error:

TypeError: dict() got multiple values for keyword argument 'jsonld'

** stacktrace

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [1], in <module>
----> 1 import ipyradiant

File ~/Tools/python/envs/python-jupyter-ipyradian/lib/python3.9/site-packages/ipyradiant/__init__.py:13, in <module>
      6 from ._version import __version__
      7 from .basic_tools import (
      8     CustomURIRef,
      9     MultiPanelSelect,
     10     PredicateMultiselectApp,
     11     collapse_predicates,
     12 )
---> 13 from .loader import FileManager, PathLoader, UpLoader
     14 from .query import QueryWidget, SPARQLQueryFramer, service_patch_rdflib
     15 from .visualization import (
     16     CytoscapeViewer,
     17     CytoscapeVisualizer,
   (...)
     20     LayoutSelector,
     21 )

File ~/Tools/python/envs/python-jupyter-ipyradian/lib/python3.9/site-packages/ipyradiant/loader/__init__.py:7, in <module>
      3 # Copyright (c) 2021 ipyradiant contributors.
      4 # Distributed under the terms of the Modified BSD License.
      6 __all__ = ["FileManager", "UpLoader", "PathLoader"]
----> 7 from .manager import FileManager
      8 from .path import PathLoader
      9 from .upload import UpLoader

File ~/Tools/python/envs/python-jupyter-ipyradian/lib/python3.9/site-packages/ipyradiant/loader/manager.py:10, in <module>
      7 import traitlets as T
      8 from rdflib import BNode, Graph
---> 10 from .base import BaseLoader
     11 from .upload import UpLoader
     14 class FileManager(W.HBox):

File ~/Tools/python/envs/python-jupyter-ipyradian/lib/python3.9/site-packages/ipyradiant/loader/base.py:9, in <module>
      6 import traitlets as T
      7 from rdflib import BNode, Graph
----> 9 from .util import guess_format
     12 class BaseLoader(W.Widget):
     13     """Base class for loaders.
     14 
     15     Uses the metadata format from FileUpload
     16     """

File ~/Tools/python/envs/python-jupyter-ipyradian/lib/python3.9/site-packages/ipyradiant/loader/util.py:11, in <module>
      8 register("json-ld", Parser, "rdflib_jsonld.parser", "JsonLDParser")
      9 register("json-ld", Serializer, "rdflib_jsonld.serializer", "JsonLDSerializer")
---> 11 SUFFIX_FORMAT_MAP = dict(**util.SUFFIX_FORMAT_MAP, jsonld="json-ld", json="json-ld")
     14 def guess_format(path):
     15     """wrap guess_format with custom files"""

TypeError: dict() got multiple values for keyword argument 'jsonld'

And the pip list

Package              Version
-------------------- ---------
anyio                3.5.0
argon2-cffi          21.3.0
argon2-cffi-bindings 21.2.0
asttokens            2.0.5
attrs                21.4.0
Babel                2.9.1
backcall             0.2.0
black                22.1.0
bleach               4.1.0
bokeh                2.4.2
certifi              2021.10.8
cffi                 1.15.0
charset-normalizer   2.0.12
click                8.0.3
cloudpickle          2.0.0
colorcet             3.0.0
dask                 2022.2.0
datashader           0.13.0
datashape            0.5.2
debugpy              1.5.1
decorator            5.1.1
defusedxml           0.7.1
distributed          2022.2.0
entrypoints          0.4
executing            0.8.2
fsspec               2022.1.0
HeapDict             1.0.1
holoviews            1.14.8
idna                 3.3
imageio              2.16.0
importlib-metadata   4.11.1
ipycytoscape         1.3.2
ipykernel            6.9.1
ipyradiant           0.2.0
ipython              8.0.1
ipython-genutils     0.2.0
ipywidgets           7.6.5
isodate              0.6.1
jedi                 0.18.1
Jinja2               3.0.3
json5                0.9.6
jsonschema           4.4.0
jupyter-client       7.1.2
jupyter-core         4.9.2
jupyter-server       1.13.5
jupyterlab           3.2.9
jupyterlab-pygments  0.1.2
jupyterlab-server    2.10.3
jupyterlab-widgets   1.0.2
llvmlite             0.38.0
locket               0.2.1
Markdown             3.3.6
MarkupSafe           2.1.0
matplotlib-inline    0.1.3
mistune              0.8.4
msgpack              1.0.3
multipledispatch     0.6.0
mypy-extensions      0.4.3
nbclassic            0.3.5
nbclient             0.5.11
nbconvert            6.4.2
nbformat             5.1.3
nest-asyncio         1.5.4
networkx             2.6.3
notebook             6.4.8
numba                0.55.1
numpy                1.21.5
packaging            21.3
pandas               1.4.1
pandocfilters        1.5.0
panel                0.12.6
param                1.12.0
parso                0.8.3
partd                1.2.0
pathspec             0.9.0
pexpect              4.8.0
pickleshare          0.7.5
Pillow               9.0.1
pip                  20.3.4
pkg-resources        0.0.0
platformdirs         2.5.0
prometheus-client    0.13.1
prompt-toolkit       3.0.28
psutil               5.9.0
ptyprocess           0.7.0
pure-eval            0.2.2
pycparser            2.21
pyct                 0.4.8
Pygments             2.11.2
pyparsing            3.0.7
pyrsistent           0.18.1
python-dateutil      2.8.2
pytz                 2021.3
pyviz-comms          2.1.0
PyWavelets           1.2.0
PyYAML               6.0
pyzmq                22.3.0
rdflib               6.1.1
rdflib-jsonld        0.6.2
requests             2.27.1
scikit-image         0.19.2
scipy                1.8.0
Send2Trash           1.8.0
setuptools           44.1.1
six                  1.16.0
sniffio              1.2.0
sortedcontainers     2.4.0
spectate             1.0.1
stack-data           0.2.0
tblib                1.7.0
terminado            0.13.1
testpath             0.5.0
tifffile             2022.2.9
tomli                2.0.1
toolz                0.11.2
tornado              6.1
tqdm                 4.62.3
traitlets            5.1.1
typing-extensions    4.1.1
urllib3              1.26.8
wcwidth              0.2.5
webencodings         0.5.1
websocket-client     1.2.3
widgetsnbextension   3.5.2
xarray               0.21.1
zict                 2.0.0
zipp                 3.7.0

Regards

djangoliv commented 2 years ago

The problem is already fixed. sorry for the noise.

zwelz3 commented 2 years ago

Thanks for reporting @djangoliv You can use #123 to track the progress of this patch in release