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

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #469

Open
tobiasduerschmid opened this issue Aug 25, 2021 · 0 comments

Comments

@tobiasduerschmid
Copy link
Collaborator

For autorally-01 we get this exception when analyzing the architecture.

2021-08-25 15:37:27.305 | DEBUG    | rosdiscover.recover.tool:_recover:367 - finished static recovery process
2021-08-25 15:37:27.863 | WARNING  | rosdiscover.interpreter.interpreter:_load:243 - failed to find model for node type [xbeeCoordinator] in package [autorally_core]
2021-08-25 15:37:27.864 | ERROR    | rosdiscover.interpreter.interpreter:launch:109 - failed to launch node: xbeeCoordinator
Traceback (most recent call last):

  File "/home/rosqual/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 239, in _load
    model = self.models.fetch(pkg, nodetype)
            │    │      │     │    └ 'xbeeCoordinator'
            │    │      │     └ 'autorally_core'
            │    │      └ <function ProjectModels.fetch at 0x7ff1c544bf70>
            │    └ ProjectModels(config=Config(image='autorally-01', sources=('/opt/ros/indigo/setup.bash', '/bug_fix/devel/setup.bash', '/bug_f...
            └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7ff1c5521130>

  File "/home/rosqual/rosdiscover/src/rosdiscover/project/models.py", line 134, in fetch
    fetched_model = model_source(package, node)
                    │            │        └ 'xbeeCoordinator'
                    │            └ 'autorally_core'
                    └ <bound method ProjectModels._recover of ProjectModels(config=Config(image='autorally-01', sources=('/opt/ros/indigo/setup.bas...

  File "/home/rosqual/rosdiscover/src/rosdiscover/project/models.py", line 76, in _recover
    model = self._recovery_tool.recover(
            │    └ <member '_recovery_tool' of 'ProjectModels' objects>
            └ ProjectModels(config=Config(image='autorally-01', sources=('/opt/ros/indigo/setup.bash', '/bug_fix/devel/setup.bash', '/bug_f...

  File "/home/rosqual/rosdiscover/src/rosdiscover/recover/tool.py", line 281, in recover
    program = self._recover(compile_commands_path, entrypoint, sources, path_restrictions)
              │    │        │                      │           │        └ ['/bug_fix/devel/include/autorally_core', '/bug_fix/src/repo/autorally_core']
              │    │        │                      │           └ ['/bug_fix/src/repo/autorally_core/src/xbee/XbeeCoordinator.cpp', '/bug_fix/src/repo/autorally_core/src/xbee/XbeeInterface.cpp']
              │    │        │                      └ 'main'
              │    │        └ '/bug_fix/build/compile_commands.json'
              │    └ <function NodeRecoveryTool._recover at 0x7ff1c544b700>
              └ NodeRecoveryTool(_app=App(image='autorally-01', sources=('/opt/ros/indigo/setup.bash', '/bug_fix/devel/setup.bash', '/bug_fix...

  File "/home/rosqual/rosdiscover/src/rosdiscover/recover/tool.py", line 372, in _recover
    json_model = json.loads(json_model_file_contents)
                 │    │     └ ''
                 │    └ <function loads at 0x7ff1c7c52550>
                 └ <module 'json' from '/home/rosqual/.pyenv/versions/3.9.6/lib/python3.9/json/__init__.py'>

  File "/home/rosqual/.pyenv/versions/3.9.6/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           │                │      └ ''
           │                └ <function JSONDecoder.decode at 0x7ff1c7c3fdc0>
           └ <json.decoder.JSONDecoder object at 0x7ff1c7c3ac40>
  File "/home/rosqual/.pyenv/versions/3.9.6/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               │    │          │      │  └ ''
               │    │          │      └ <built-in method match of re.Pattern object at 0x7ff1c7f53570>
               │    │          └ ''
               │    └ <function JSONDecoder.raw_decode at 0x7ff1c7c3fe50>
               └ <json.decoder.JSONDecoder object at 0x7ff1c7c3ac40>
  File "/home/rosqual/.pyenv/versions/3.9.6/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
          │                                  └ ''
          └ <class 'json.decoder.JSONDecodeError'>

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/rosqual/.local/share/virtualenvs/rosdiscover-wOCQtMeJ/bin/rosdiscover", line 33, in <module>
    sys.exit(load_entry_point('rosdiscover', 'console_scripts', 'rosdiscover')())
    │   │    └ <function importlib_load_entry_point at 0x7ff1cc97d0d0>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>

  File "/home/rosqual/rosdiscover/src/rosdiscover/cli.py", line 233, in main
    args.func(args)
    │    │    └ Namespace(output=None, config=<_io.TextIOWrapper name='/home/rosqual/rosdiscover-evaluation/bugs/autorally-01/rd_autorally-01...
    │    └ <function launch at 0x7ff1c539ac10>
    └ Namespace(output=None, config=<_io.TextIOWrapper name='/home/rosqual/rosdiscover-evaluation/bugs/autorally-01/rd_autorally-01...

  File "/home/rosqual/rosdiscover/src/rosdiscover/cli.py", line 59, in launch
    summary = _launch_config(args)
              │              └ Namespace(output=None, config=<_io.TextIOWrapper name='/home/rosqual/rosdiscover-evaluation/bugs/autorally-01/rd_autorally-01...
              └ <function _launch_config at 0x7ff1c5365310>

  File "/home/rosqual/rosdiscover/src/rosdiscover/cli.py", line 54, in _launch_config
    return _launch(config)
           │       └ Config(image='autorally-01', sources=('/opt/ros/indigo/setup.bash', '/bug_fix/devel/setup.bash', '/bug_fix/src/repo/autorally...
           └ <function _launch at 0x7ff1c5367940>

  File "/home/rosqual/rosdiscover/src/rosdiscover/cli.py", line 48, in _launch
    interpreter.launch(fn_launch)
    │           │      └ Launch(filename='/bug_fix/src/repo/autorally_core/launch/baseStation.launch', arguments={})
    │           └ <function Interpreter.launch at 0x7ff1c5454940>
    └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7ff1c5521130>

> File "/home/rosqual/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 99, in launch
    self._load(pkg=node.package,
    │    │         │    └ <member 'package' of 'NodeConfig' objects>
    │    │         └ NodeConfig(namespace='/', name='xbeeCoordinator', typ='xbeeCoordinator', package='autorally_core', executable_path='/bug_fix/...
    │    └ <function Interpreter._load at 0x7ff1c5454af0>
    └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7ff1c5521130>

  File "/home/rosqual/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 244, in _load
    raise Exception(m)
                    └ 'failed to find model for node type [xbeeCoordinator] in package [autorally_core]'

Exception: failed to find model for node type [xbeeCoordinator] in package [autorally_core]
2021-08-25 15:37:28.212 | DEBUG    | roswire.app.instance:close:157 - destroying app instance directory: /home/rosqual/.roswire/containers/tmppn8z9fn1
2021-08-25 15:37:28.213 | DEBUG    | roswire.app.instance:close:159 - destroyed app instance directory: /home/rosqual/.roswire/containers/tmppn8z9fn1
2021-08-25 15:37:28.576 | DEBUG    | roswire.app.instance:close:157 - destroying app instance directory: /home/rosqual/.roswire/containers/tmpqkvpysuf
2021-08-25 15:37:28.576 | DEBUG    | roswire.app.instance:close:159 - destroyed app instance directory: /home/rosqual/.roswire/containers/tmpqkvpysuf
Traceback (most recent call last):
  File "/home/rosqual/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 239, in _load
    model = self.models.fetch(pkg, nodetype)
  File "/home/rosqual/rosdiscover/src/rosdiscover/project/models.py", line 134, in fetch
    fetched_model = model_source(package, node)
  File "/home/rosqual/rosdiscover/src/rosdiscover/project/models.py", line 76, in _recover
    model = self._recovery_tool.recover(
  File "/home/rosqual/rosdiscover/src/rosdiscover/recover/tool.py", line 281, in recover
    program = self._recover(compile_commands_path, entrypoint, sources, path_restrictions)
  File "/home/rosqual/rosdiscover/src/rosdiscover/recover/tool.py", line 372, in _recover
    json_model = json.loads(json_model_file_contents)
  File "/home/rosqual/.pyenv/versions/3.9.6/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/rosqual/.pyenv/versions/3.9.6/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/rosqual/.pyenv/versions/3.9.6/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rosqual/.local/share/virtualenvs/rosdiscover-wOCQtMeJ/bin/rosdiscover", line 33, in <module>
    sys.exit(load_entry_point('rosdiscover', 'console_scripts', 'rosdiscover')())
  File "/home/rosqual/rosdiscover/src/rosdiscover/cli.py", line 233, in main
    args.func(args)
  File "/home/rosqual/rosdiscover/src/rosdiscover/cli.py", line 59, in launch
    summary = _launch_config(args)
  File "/home/rosqual/rosdiscover/src/rosdiscover/cli.py", line 54, in _launch_config
    return _launch(config)
  File "/home/rosqual/rosdiscover/src/rosdiscover/cli.py", line 48, in _launch
    interpreter.launch(fn_launch)
  File "/home/rosqual/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 99, in launch
    self._load(pkg=node.package,
  File "/home/rosqual/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 244, in _load
    raise Exception(m)
Exception: failed to find model for node type [xbeeCoordinator] in package [autorally_core]

The entire log can be found here:
rd_autorally-01_bug_fix_out.log

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