question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] - AttributeError 'capa.render.result_document' has no attribute 'convert_capabilities_to_result_document'

See original GitHub issue

Description

When using capa_as_library, error is raised on convert_capabilities_to_result_document

Steps to Reproduce

A naive test case:

>>> from scripts.capa_as_library import *
>>> results = capa_details('tests/data/mimikatz.exe_')
CB is None in graph building?!?! (0x41d286)
(fva: 0x0041d251 cbva: 0x0041d286)
FB is None in graph building!??!
..snipped...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "capa/scripts/capa_as_library.py", line 178, in capa_details
    doc = capa.render.result_document.convert_capabilities_to_result_document(meta, rules, capabilities)
AttributeError: module 'capa.render.result_document' has no attribute 'convert_capabilities_to_result_document'

Expected behavior: Return dict of capa_output to caller

Actual behavior: AttributeError is raised

Versions

Build from latest master

Additional Information

n/a

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
williballenthincommented, Jun 28, 2022

also, welcome back 😃

1reaction
williballenthincommented, Jun 28, 2022

good catch, thanks!

i’ll make the fix here and also add this script into the CI testing so something like this doesn’t happen again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'str' object has no attribute 'target_people'
since bug 1197879 landed i see the following in the rb logs when refreshing the docker container: 2016-05-19 06:02:41,750 - ERROR - -...
Read more >
'NoneType' object has no attribute 'title' on bulk management
AttributeError while rendering: 'NoneType' object has no attribute 'title' on bulk management ; Component/s. Apps - Confluence Questions ; Affected version/s. No- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found