简体   繁体   中英

jsondecodeerror in db2 jupyter notebook

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

thanks for all update in the mean time, found the problem and has been corrected the problem was the download : when being on github file list I richt clicked and save as.. in this case the file is corrupted downloaded the file with : download zipfile - that downloaded the folder with all files as a zipfile. then unpacked the zipfile and use the db2 notebook I also found that you could view raw data from notebook and save as.. thks for all update best regards, Guy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM