Open j0lama opened 3 years ago
There is a TypeError exception when the MsgLogger uses the dictionary (MsgLogger.DICT) as decoding format.
The log file used is: MobileInsight-6.0.0b0/examples/offline_log_example.mi2log
#!/usr/bin/python import os import sys from mobile_insight.monitor import OfflineReplayer from mobile_insight.analyzer import MsgLogger, LteRrcAnalyzer, LteNasAnalyzer, LtePhyAnalyzer, LteMacAnalyzer, LtePdcpAnalyzer, LteRlcAnalyzer if __name__ == "__main__": if len(sys.argv) != 2: print("USE: python3 test.py <FILE.mi2log>") sys.exit() # Initialize a 3G/4G monitor src = OfflineReplayer() src.set_input_path(sys.argv[1]) logger = MsgLogger() logger.set_decode_format(MsgLogger.DICT) logger.set_dump_type(MsgLogger.STDIO_ONLY) logger.set_source(src) # Analyzers #lte_rrc_analyzer = LteRrcAnalyzer() #lte_rrc_analyzer.set_source(src) # bind with the monitor #lte_nas_analyzer = LteNasAnalyzer() #lte_nas_analyzer.set_source(src) lte_phy_analyzer = LtePhyAnalyzer() lte_phy_analyzer.set_source(src) #lte_mac_analyzer = LteMacAnalyzer() #lte_mac_analyzer.set_source(src) # Start the monitoring src.run()
[INFO] [OfflineReplayer]: Enable LTE_PHY_PDSCH_Packet [INFO] [OfflineReplayer]: Enable LTE_PHY_PUSCH_CSF [INFO] [OfflineReplayer]: Enable LTE_MAC_UL_Tx_Statistics [INFO] [OfflineReplayer]: Enable LTE_PHY_PUCCH_Tx_Report [INFO] [OfflineReplayer]: Enable LTE_PHY_PUSCH_Tx_Report [INFO] [OfflineReplayer]: STARTED: 1619524127.593187 [INFO] [OfflineReplayer]: Loading MobileInsight-6.0.0b0/examples/offline_log_example.mi2log [INFO] [OfflineReplayer]: Loading: 1619524127.596473 Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/MobileInsight-6.0.0b0-py3.6-linux-x86_64.egg/mobile_insight/monitor/offline_replayer.py", line 209, in run self.send(event) File "/usr/local/lib/python3.6/dist-packages/MobileInsight-6.0.0b0-py3.6-linux-x86_64.egg/mobile_insight/element.py", line 104, in send self.to_list[i].recv(self, event) File "/usr/local/lib/python3.6/dist-packages/MobileInsight-6.0.0b0-py3.6-linux-x86_64.egg/mobile_insight/analyzer/analyzer.py", line 234, in recv self.source_callback[i](event) File "/usr/local/lib/python3.6/dist-packages/MobileInsight-6.0.0b0-py3.6-linux-x86_64.egg/mobile_insight/analyzer/msg_logger.py", line 134, in __dump_message self.log_info(decoded_msg) File "/usr/local/lib/python3.6/dist-packages/MobileInsight-6.0.0b0-py3.6-linux-x86_64.egg/mobile_insight/element.py", line 146, in log_info + self.__class__.__name__ + ']\033[0m: ' + msg TypeError: must be str, not dict
Versions
Description
There is a TypeError exception when the MsgLogger uses the dictionary (MsgLogger.DICT) as decoding format.
Code and Logs
The log file used is: MobileInsight-6.0.0b0/examples/offline_log_example.mi2log