1.在利用脚本导入的时候报错
Failed: error processing document #2: invalid character ',' looking for beginning of value
分析:https://segmentfault.com/a/1190000014796995?utm_source=tag-newest
解決:
代码定位:
第二种办法就是写脚本去除json文件每行最后的" ,"
2.报错mongo库新建db无权限
3.转化效率:
screen -S btc
python3 +文件名.py 运行脚本
screen -r btc
json文件大小 14.5MB 25050条数据 转化用时5.17秒
json文件大小 3.85GB 条数据 转化用时314.5秒
25分钟 处理json文件 21GB
一个小时处理 了 44GB文件
两个小时处理 了 86GB文件
共356 GB 共319个json文件 预计处理时间 8.091小时
查看文件夹的大小
cd /backup/btc/btc_outputList_tx
du -sh
btc_new_tx数据格式:
- 运行一半的时候报错:
File "btc_new_tx_read_save.py", line 78, in get_outputList
"address": vo1["address"][0],
5.运行mutip_btc_tx.py脚本的时候,报错:
87行
string index out of range
原因;
数据结构发生变化:
对比浏览器:
解决:
在遍历vout的"address"的值得时候,进行数据类型判断,如果vout的address 是list,就切片取值,如果是"",则忽略!
6.报错:
Unterminated string starting at: line 1 column 488 (char 487)
7.成功的格式:
8.处理后格式检验:
两个vin 一样的地址: