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

KeyError: 'caller_port' #74

Open
koftnt opened this issue Jun 1, 2022 · 2 comments
Open

KeyError: 'caller_port' #74

koftnt opened this issue Jun 1, 2022 · 2 comments

Comments

@koftnt
Copy link

koftnt commented Jun 1, 2022

When using:

sapp --tool=mariana-trench analyze .
I got error:
/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship Run.issue_instances to refer to viewonly relationship IssueInstance.run should include sync_backref=False set on the Run.issue_instances relationship. (this warning may be suppressed after 10 occurrences)
util.warn_limited(
/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship IssueInstance.run to refer to viewonly relationship Run.issue_instances should include sync_backref=False set on the IssueInstance.run relationship. (this warning may be suppressed after 10 occurrences)
util.warn_limited(
2022-06-01 20:47:21,491 [INFO] Parsing analysis output...
Traceback (most recent call last):
File "/Users/shijian03/.venvs/mariana-trench/bin/sapp", line 8, in
sys.exit(cli())
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/cli_lib.py", line 208, in analyze
pipeline.run(analysis_output, summary_blob)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/init.py", line 363, in run
next_input, summary = step.run(next_input, summary)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 236, in run
self.analysis_output_to_dict_entries(
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 188, in analysis_output_to_dict_entries
for typ, key, e in self._analysis_output_to_parsed_tuples(inputfile):
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 135, in _analysis_output_to_parsed_tuples
for e in entries:
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 351, in parse
yield from self.parse_handle(handle)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 367, in parse_handle
for postcondition in self._parse_postconditions(model):
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 528, in _parse_postconditions
port=Port.from_json(generation["caller_port"], "source"),
KeyError: 'caller_port'

Looking forward to hearing from you.
Thanks!

@Securee
Copy link

Securee commented Aug 4, 2022

When using:

sapp --tool=mariana-trench analyze . I got error: /Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship Run.issue_instances to refer to viewonly relationship IssueInstance.run should include sync_backref=False set on the Run.issue_instances relationship. (this warning may be suppressed after 10 occurrences) util.warn_limited( /Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship IssueInstance.run to refer to viewonly relationship Run.issue_instances should include sync_backref=False set on the IssueInstance.run relationship. (this warning may be suppressed after 10 occurrences) util.warn_limited( 2022-06-01 20:47:21,491 [INFO] Parsing analysis output... Traceback (most recent call last): File "/Users/shijian03/.venvs/mariana-trench/bin/sapp", line 8, in sys.exit(cli()) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1130, in call return self.main(*args, **kwargs) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/cli_lib.py", line 208, in analyze pipeline.run(analysis_output, summary_blob) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/init.py", line 363, in run next_input, summary = step.run(next_input, summary) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 236, in run self.analysis_output_to_dict_entries( File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 188, in analysis_output_to_dict_entries for typ, key, e in self._analysis_output_to_parsed_tuples(inputfile): File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 135, in _analysis_output_to_parsed_tuples for e in entries: File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 351, in parse yield from self.parse_handle(handle) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 367, in parse_handle for postcondition in self._parse_postconditions(model): File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 528, in _parse_postconditions port=Port.from_json(generation["caller_port"], "source"), KeyError: 'caller_port'

Looking forward to hearing from you. Thanks!

I have met the same issue. Any suggestion ?

@0xedward
Copy link
Contributor

Hey @Securee and @koftnt, if you rerun MT on your code with the latest version of MT and run sapp analyze on the output from MT. Does this issue still reproduce on the latest version of fb-sapp (0.5.3)?

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

3 participants