I am a complete novice in this area and trying to understand
I have a linux machine with anaconda, python, ibm_db, jupyter notebooks installed
I am following a pdf to activate a db2 connection from notebook
started jupyter : ok
open new notebook and : %run db2.ipynb
this notebook I downloaded from https://github.com/DB2-Samples/db2jupyter
Only one file is needed: db2.ipynb when running this notebook I get an error
JSONDecodeError Traceback (most recent call last) /Software/Anaconda/lib/python3.7/site-packages/nbformat/reader.py in parse_json(s, **kwargs) 13 try: —> 14 nb_dict = json.loads(s, **kwargs) 15 except ValueError:
/Software/Anaconda/lib/python3.7/json/init.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 347 parse_constant is None and object_pairs_hook is None and not kw): –> 348 return _default_decoder.decode(s) 349 if cls is None:
/Software/Anaconda/lib/python3.7/json/decoder.py in decode(self, s, _w) 336 “”" –> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 338 end = _w(s, end).end()
/Software/Anaconda/lib/python3.7/json/decoder.py in raw_decode(self, s, idx) 354 except StopIteration as err: –> 355 raise JSONDecodeError(“Expecting value”, s, err.value) from None 356 return obj, end
JSONDecodeError: Expecting value: line 7 column 1 (char 6)
During handling of the above exception, another exception occurred:
NotJSONError Traceback (most recent call last)
can this error be related to setup or is something specific needed, that was noted in the install procedure ?
thanks for all update best regards, Guy Przytula
db2.ipynbappears to work as expected. - maodb2.ipynbalso works for me on RHEL 7.7 with anaconda 2020.02, after modifyingdb2.ipynbwith the database connection details. Then the %sql works as expected (with local sample database). Maybe edit your question to include a link to the PDF that you are following. - mao