简体   繁体   English

db2 jupyter notebook 中的 jsondecodeerror

[英]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我有一台装有 anaconda、python、ibm_db、jupyter notebooks 的 linux 机器

I am following a pdf to activate a db2 connection from notebook我正在关注 pdf 以从笔记本激活 db2 连接

started jupyter : ok启动 jupyter :好的

open new notebook and : %run db2.ipynb打开新笔记本并:%run db2.ipynb

this notebook I downloaded from https://github.com/DB2-Samples/db2jupyter我从https://github.com/DB2-Samples/db2jupyter下载的这个笔记本

Only one file is needed: db2.ipynb when running this notebook I get an error只需要一个文件:db2.ipynb 运行此笔记本时出现错误

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: JSONDecodeError Traceback(最近一次调用最后一次)/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 除了 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/init.py in load(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 347 parse_constant 是 None 和 object_pairs_hook 是 None 和不是 kw ): –> 348 如果 cls 为 None 则返回 _default_decoder.decode(s) 349:

/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 在 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 /Software/Anaconda/lib/python3.7/json/decoder.py in raw_decode(self, s, idx) 354 除了 StopIteration as err: –> 355 raise JSONDecodeError(“Expecting value”, s, err.value) from None第356回

JSONDecodeError: Expecting value: line 7 column 1 (char 6) JSONDecodeError:期望值:第 7 行第 1 列(字符 6)

During handling of the above exception, another exception occurred:在处理上述异常的过程中,又发生了一个异常:

NotJSONError Traceback (most recent call last) NotJSONError 追溯(最近一次调用最后一次)

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感谢所有更新最好的问候,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.感谢同时进行的所有更新,发现问题并已更正问题是下载:当在 github 文件列表中时,我点击并另存为 .. 在这种情况下,文件已损坏,下载文件:下载 zipfile - 将包含所有文件的文件夹下载为 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然后解压 zipfile 并使用 db2 notebook 我还发现您可以从 notebook 中查看原始数据并另存为……感谢所有更新,Guy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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