(base) matthew@matthew-Oryx-Pro ~/Documents/candela/lanforge-scripts/py-scripts (master) > ./test_l4.py --mgr 192.168.50.247 --radio wiphy1 --ssid stidham_5G --security wpa2 --passwd OMITTED --test_type bytes-wr --url "ul https://www.stidmatt.com /dev/null" --test_rig ct523c-ccbc --test_tag development --dut_hw_version "Asus ROG" --dut_sw_version Asus --dut_model_num GT-AXE11000 --dut_serial_num 192.45.168.45 Defaulting data file output type to Excel Saving file to local directory Defaulting data file output type to Excel self.kpi_path self.kpi_filename kpi.csv kpifile kpi.csv LANforge GUI connection not found sleeping 5 seconds, tried: http://192.168.50.247:8080 Creating stations .. Starting test This is the dictionary which we are transforming into a Pandas dataframe in lanforge_scripts.py_scripts.lf_kpi_csv.lf_kpi_csv.create_dataframe() {'sta0000_l4': {'!conn': 0, 'acc. denied': 0, 'bad-proto': 0, 'bad-url': 0, 'bytes-rd': 0, 'bytes-wr': 0, 'dns-avg': 0.413, 'dns-max': 52, 'dns-min': 0, 'eid': '1.1.10.36', 'elapsed': 129, 'entity id': '1.1.10.36.11', 'fb-avg': 353.399, 'fb-max': 749, 'fb-min': 322, 'ftp-host': 0, 'ftp-port': 0, 'ftp-stor': 0, 'http-p': 0, 'http-r': 0, 'http-t': 0, 'login-denied': 0, 'nf (4xx)': 0, 'other-err': 0, 'read': 0, 'redir': 0, 'rpt timer': 5000, 'rslv-h': 0, 'rslv-p': 0, 'rx rate': 0, 'rx-rate-1m': 0, 'status': 'Run', 'timeout': 0, 'total-err': 129, 'total-urls': 129, 'tx rate': 0, 'tx-rate-1m': 0, 'type': 'L4/Gen', 'uc-avg': 353.501, 'uc-max': 749, 'uc-min': 322, 'urls/s': 1.0, 'write': 129}, 'sta0001_l4': {'!conn': 0, 'acc. denied': 0, 'bad-proto': 0, 'bad-url': 0, 'bytes-rd': 0, 'bytes-wr': 0, 'dns-avg': 0.123, 'dns-max': 11, 'dns-min': 0, 'eid': '1.1.11.37', 'elapsed': 129, 'entity id': '1.1.11.37.11', 'fb-avg': 345.902, 'fb-max': 646, 'fb-min': 322, 'ftp-host': 0, 'ftp-port': 0, 'ftp-stor': 0, 'http-p': 0, 'http-r': 0, 'http-t': 0, 'login-denied': 0, 'nf (4xx)': 0, 'other-err': 0, 'read': 0, 'redir': 0, 'rpt timer': 5000, 'rslv-h': 0, 'rslv-p': 0, 'rx rate': 0, 'rx-rate-1m': 0, 'status': 'Run', 'timeout': 0, 'total-err': 129, 'total-urls': 129, 'tx rate': 0, 'tx-rate-1m': 0, 'type': 'L4/Gen', 'uc-avg': 345.95, 'uc-max': 646, 'uc-min': 322, 'urls/s': 0.9833333333333333, 'write': 129}, 'timestamp': 1643769041838.184} numeric-score short-description 29 0 rx rate 41 1.0 urls/s 72 0 rx rate 84 0.983333 urls/s short-description numeric-score 0 rx rate 0.000000 1 urls/s 1.983333 # Custom Pandas debug I added to figure out where the problem is generic.NDFrame.to_csv format.DataFrameRenderer.to_csv csvs.CSVFormatter.save writer IOHandles(handle=<_io.TextIOWrapper name='kpi.csv' mode='w' encoding='utf-8'>, compression={'method': None}, created_handles=[<_io.TextIOWrapper name='kpi.csv' mode='w' encoding='utf-8'>], is_wrapped=False, is_mmap=False) <_csv.writer object at 0x7fe865837860> csvs.CSVFormatter.save csvs.CSVFormatter.save_body data_index csvs.CSVFormatter.save_chunk Data_index This is the data we are passing into the csv module write_csv_rows from pandas.io.formats.csvs.CSFormatter._save_chunk() from this we know that the code is correct up to this point [array(['1643769041838.184', '1643769041838.184'], dtype=object), array(['ct523c-ccbc', 'ct523c-ccbc'], dtype=object), array(['development', 'development'], dtype=object), array(['Asus ROG', 'Asus ROG'], dtype=object), array(['Asus', 'Asus'], dtype=object), array(['GT-AXE11000', 'GT-AXE11000'], dtype=object), array(['', ''], dtype=object), array(['', ''], dtype=object), array(['', ''], dtype=object), array(['Rx Rate', 'URLs per Second'], dtype=object), array(['', ''], dtype=object), array(['0.0', '1.9833333333333334'], dtype=object), array(['', ''], dtype=object), array(['', ''], dtype=object), array(['Rx Rate', 'URLs per Second'], dtype=object), array(['', ''], dtype=object), array(['', ''], dtype=object)] .. From this we know that the error is not in pandas, we can narrow it down to csv.c in Python modules, particularly where write_rows is defined Full test passed (base) matthew@matthew-Oryx-Pro ~/Documents/candela/lanforge-scripts/py-scripts (master) > pd.read_csv('kpi.csv') bash: syntax error near unexpected token `'kpi.csv'' (base) matthew@matthew-Oryx-Pro ~/Documents/candela/lanforge-scripts/py-scripts (master) > python Python 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> pd.read_csv('kpi.csv') Traceback (most recent call last): File "", line 1, in NameError: name 'pd' is not defined >>> import pandas as pd >>> pd.read_csv('kpi.csv') Date test-rig test-tag dut-hw-version dut-sw-version dut-model-num ... numeric-score test details Units Graph-Group Subtest-Pass Subtest-Fail 0 6.437690e+11 ct523c-ccbc development Asus ROG Asus GT-AXE11000 ... 0.000000 NaN NaN Rx Rate NaN NaN 1 1.643769e+12 ct523c-ccbc development Asus ROG Asus GT-AXE11000 ... 1.983333 NaN NaN URLs per Second NaN NaN [2 rows x 17 columns] >>> We now know for a fact that when we pass this input into the _csv.c module in Python it is cutting off the 1 which should be at the beginning of the first column of the first row.