JSONDecodeError:期望值:第384行第25列(字符10546)

时间:2018-04-13 13:49:39

标签: json python-3.x

使用json加载python文件时出错。此文件只是我在文件夹中获得的json个文件之一,所有其他json文件都可以顺利加载。仅对于此特定文件,它失败并且我收到此错误

JSONDecodeError: Expecting value: line 384 column 25 (char 10546) 这是我的python代码,它适用于文件夹中的大多数json文件:

for filename in os.listdir('C:/Users/yilin.chen/Desktop/JSON'):
    if filename.endswith(".json"):
        data = json.load(open('C:/Users/yilin.chen/Desktop/JSON/' + filename))

有没有人有任何想法?

这是json文件:

 {
   "serialNumber": "PCBA-10327-0001|11|S10575|170524|CRE-14114",
   "partNumber": "PCBA-10327-0001",
   "testRunStartTime": "2017-07-13T11:30:00Z",
   "testRunStopTime": "2017-07-13T11:34:00Z",
   "operator": "lp",
   "computerName": ".PENG-PC",
   "fixtureID": "prototype",
   "overallTestRunStatus": "FAIL",

   "data": [
      {
         "lLimitDetail": null,
         "lowerLimit": null,
         "passFail": "Pass",
         "testCriteria": "Boot DSP USB Service Kernel",
         "testName": "DSP",
         "uLimitDetail": null,
         "units": "PF",
         "upperLimit": null,
         "measurement": 1
      },
      {
         "lLimitDetail": null,
         "lowerLimit": null,
         "passFail": "Pass",
         "testCriteria": "FPGA PGM SFLASH AND LOAD",
         "testName": "FPGA",
         "uLimitDetail": null,
         "units": "PF",
         "upperLimit": null,
         "measurement": 1
      },
      {
         "lLimitDetail": null,
         "lowerLimit": null,
         "passFail": "Pass",
         "testCriteria": "Open HWCAL SPI Flash",
         "testName": "DSP",
         "uLimitDetail": null,
         "units": "PF",
         "upperLimit": null,
         "measurement": 1
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 900,
         "passFail": "Pass",
         "testCriteria": "RX1 DAC Offset C 50 Ohm",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 3000,
         "measurement": 1748
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 900,
         "passFail": "Pass",
         "testCriteria": "RX1 DAC Offset D 50 Ohm",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 3000,
         "measurement": 1748
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 900,
         "passFail": "Pass",
         "testCriteria": "RX1 DAC Offset C 400 Ohm",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 3000,
         "measurement": 1648
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 900,
         "passFail": "Pass",
         "testCriteria": "RX1 DAC Offset D 400 Ohm",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 3000,
         "measurement": 1763
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 900,
         "passFail": "Pass",
         "testCriteria": "RX2 DAC Offset C 50 Ohm",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 3000,
         "measurement": 1448
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 900,
         "passFail": "Pass",
         "testCriteria": "RX2 DAC Offset D 50 Ohm",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 3000,
         "measurement": 1448
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 900,
         "passFail": "Pass",
         "testCriteria": "RX2 DAC Offset C 400 Ohm",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 3000,
         "measurement": 1523
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 900,
         "passFail": "Pass",
         "testCriteria": "RX2 DAC Offset D 400 Ohm",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 3000,
         "measurement": 1388
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -50,
         "passFail": "Pass",
         "testCriteria": "RX1 FPGA Offset Comp A",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 50,
         "measurement": -13
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -50,
         "passFail": "Pass",
         "testCriteria": "RX1 FPGA Offset Comp B",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 50,
         "measurement": -25
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -50,
         "passFail": "Pass",
         "testCriteria": "RX1 FPGA Offset Comp C",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 50,
         "measurement": -25
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -50,
         "passFail": "Pass",
         "testCriteria": "RX1 FPGA Offset Comp D",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 50,
         "measurement": 7
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -50,
         "passFail": "Pass",
         "testCriteria": "RX2 FPGA Offset Comp A",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 50,
         "measurement": -13
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -50,
         "passFail": "Pass",
         "testCriteria": "RX2 FPGA Offset Comp B",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 50,
         "measurement": -25
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -50,
         "passFail": "Pass",
         "testCriteria": "RX2 FPGA Offset Comp C",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 50,
         "measurement": -25
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -50,
         "passFail": "Pass",
         "testCriteria": "RX2 FPGA Offset Comp D",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 50,
         "measurement": 7
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 1.02,
         "passFail": "Fail",
         "testCriteria": "RX1 Gain A",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 1.10,
         "measurement": 0.0483602881
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 1.02,
         "passFail": "Pass",
         "testCriteria": "RX1 Gain B",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 1.08,
         "measurement": 1.0499999523
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 1.02,
         "passFail": "Fail",
         "testCriteria": "RX1 Gain C",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 1.10,
         "measurement": 3.7083392143
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 1.02,
         "passFail": "Fail",
         "testCriteria": "RX1 Gain D",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 1.10,
         "measurement": 13.8528099060
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 20,
         "passFail": "Fail",
         "testCriteria": "RX1 CHA Phase Tick",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 40,
         "measurement": 18
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 20,
         "passFail": "Pass",
         "testCriteria": "RX1 CHB Phase Tick",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 40,
         "measurement": 32
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 20,
         "passFail": "Pass",
         "testCriteria": "RX1 CHC Phase Tick",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 40,
         "measurement": 22
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -10,
         "passFail": "Fail",
         "testCriteria": "RX1 CHD Phase Tick",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 10,
         "measurement": 29
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 9,
         "passFail": "Pass",
         "testCriteria": "RX1 CHA Coarse Delay",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 11,
         "measurement": 10
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 9,
         "passFail": "Pass",
         "testCriteria": "RX1 CHB Coarse Delay",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 11,
         "measurement": 10
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 9,
         "passFail": "Pass",
         "testCriteria": "RX1 CHC Coarse Delay",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 11,
         "measurement": 10
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 9,
         "passFail": "Fail",
         "testCriteria": "RX1 CHD Coarse Delay",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 11,
         "measurement": 0
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 1.02,
         "passFail": "Fail",
         "testCriteria": "RX2 Gain A",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 1.10,
         "measurement": 0.0000000000
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 1.02,
         "passFail": "Pass",
         "testCriteria": "RX2 Gain B",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 1.08,
         "measurement": 1.0499999523
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 1.02,
         "passFail": "Fail",
         "testCriteria": "RX2 Gain C",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 1.10,
         "measurement": Inf
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 1.02,
         "passFail": "Fail",
         "testCriteria": "RX2 Gain D",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 1.10,
         "measurement": 11.1984214783
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 20,
         "passFail": "Pass",
         "testCriteria": "RX2 CHA Phase Tick",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 40,
         "measurement": 32
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 20,
         "passFail": "Pass",
         "testCriteria": "RX2 CHB Phase Tick",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 40,
         "measurement": 32
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 20,
         "passFail": "Fail",
         "testCriteria": "RX2 CHC Phase Tick",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 40,
         "measurement": 2
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": -10,
         "passFail": "Pass",
         "testCriteria": "RX2 CHD Phase Tick",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 10,
         "measurement": 1
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 9,
         "passFail": "Pass",
         "testCriteria": "RX2 CHA Coarse Delay",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 11,
         "measurement": 10
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 9,
         "passFail": "Pass",
         "testCriteria": "RX2 CHB Coarse Delay",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 11,
         "measurement": 10
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 9,
         "passFail": "Pass",
         "testCriteria": "RX2 CHC Coarse Delay",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 11,
         "measurement": 10
      },
      {
         "lLimitDetail": "LE",
         "lowerLimit": 9,
         "passFail": "Pass",
         "testCriteria": "RX2 CHD Coarse Delay",
         "testName": "Mfg Step",
         "uLimitDetail": "GE",
         "units": "Count",
         "upperLimit": 11,
         "measurement": 10
      }
   ]
}

0 个答案:

没有答案