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

[BUG] TypeError Exception during Report generation #166

Closed
Alb3c opened this issue Jan 12, 2023 · 3 comments
Closed

[BUG] TypeError Exception during Report generation #166

Alb3c opened this issue Jan 12, 2023 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Alb3c
Copy link

Alb3c commented Jan 12, 2023

Describe the bug
Using the default investigation template (https://docs.dfir-iris.org/operations/example_reports/iris_report_template.docx) a TypeError Exception is generated:

2023-01-12 10:54:31 :: ERROR :: app :: log_exception :: Exception on /case/report/generate-investigation/1 [GET]
Traceback (most recent call last):
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/iriswebapp/app/util.py", line 446, in wrap
return f(*args, **kwargs)
File "/iriswebapp/app/blueprints/reports/reports_route.py", line 103, in _gen_report
fpath = mreport.generate_doc_report(type="Investigation")
File "/iriswebapp/app/iris_engine/reporter/reporter.py", line 97, in generate_doc_report
generator = DocxGenerator(image_handler=image_handler)
TypeError: init() got an unexpected keyword argument 'image_handler'

To Reproduce
Steps to reproduce the behavior:

Go to Case > Generate Report
See Internal Server Error

Expected behavior
No Internal Server Error

@whikernel
Copy link
Contributor

@Alb3c Thanks for your report!
May we ask which version of IRIS you're using? If this is version 2.0.0-beta-1, this will be fixed in beta-2.

@whikernel whikernel self-assigned this Jan 12, 2023
@whikernel whikernel added this to the v2.0.0 milestone Jan 12, 2023
@tobraha
Copy link

tobraha commented Jan 28, 2023

I can confirm that this is issue remains in version beta-2. It seems that the docx-generator 'image_handler' feature was added to dfir-iris/docx-generator in #1, but it hasn't been merged into its master branch at this time.

I was able to resolve this by building a wheel package for docx-generator from develop and replacing the extant package in source/dependencies.

I expect that this will be handled before this moves out of beta, but I'd be happy to submit a PR, if you'd like.

Thanks!
-Tommy

@whikernel
Copy link
Contributor

Hi Tommy @tobraha,

Thanks for pinning the issue! Indeed, the replacement of the updated wheel wasn't done yet. We're updating for the beta-3 👍

Cheers

@whikernel whikernel added the bug Something isn't working label Jan 28, 2023
whikernel added a commit that referenced this issue Jan 28, 2023
[ADD] Exception handling in post init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants