Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MobileInsight 6.0.0 beta TypeError exception #99

Open
j0lama opened this issue Apr 27, 2021 · 0 comments
Open

MobileInsight 6.0.0 beta TypeError exception #99

j0lama opened this issue Apr 27, 2021 · 0 comments

Comments

@j0lama
Copy link

j0lama commented Apr 27, 2021

Versions

  • OS: Ubuntu 18.04.5 LTS
  • Python version: 3.6.9
  • Python installation method: apt
  • MobileInsight version: 6.0.0b0

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

#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant