Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@phutelmyer
Copy link
Contributor

@phutelmyer phutelmyer commented Feb 8, 2023

Describe the change
When scanning some Excel workbooks, the following error was thrown:

Traceback (most recent call last): File "/strelka/auxiliary/xl4ma/xlsm_wrapper.py", line 34, in parse_sheets for row in self.workbook[sheet].rows: AttributeError: 'Chartsheet' object has no attribute 'rows

The following line is not available in all scanned workbooks:

for row in self.workbook[sheet].rows:

Adding a check here to ensure the object is available to proceed with scanning:

if hasattr(self.workbook[sheet], "rows"):

This was not observed in workbooks outside of xlsm files, so no changes to xls and xlsx analyzers were made.

Describe testing procedures

docker-compose -f build/docker-compose.yaml build --build-arg CONFIG_TESTS=true backend
...
 => [17/19] RUN echo '[+] Run build checks' &&     cd /strelka/strelka/ &&     python3 -m pytest -s tests/ &&     if true; then python3 -m pytest -s tests_configuration/; fi &&     echo '[+] Done'                                126.5s
 => [18/19] RUN cd /strelka/ &&     rm -rf /strelka/                                                                                                                                                                                  0.4s
 => [19/19] RUN rm -rf /etc/strelka/                                                                                                                                                                                                  0.4s
 => exporting to image                                                                                                                                                                                                               11.3s
 => => exporting layers                                                                                                                                                                                                              11.2s
 => => writing image sha256:6ea3c8b24728743fc75dc0ef1036b1898af8c1668321a42f460e46369b88c724                                                                                                                                          0.0s
 => => naming to docker.io/library/build-backend   

Sample output
N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@phutelmyer phutelmyer merged commit 7318e21 into master Feb 8, 2023
@phutelmyer phutelmyer deleted the scanxl4ma-bugfix branch March 28, 2023 13:24
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

Successfully merging this pull request may close these issues.

1 participant