Skip to content

TypeError: must be str, not bytes in ppt_parser.decompressor.decompress #607

@jloehel

Description

@jloehel

decomp = ''

I guess this should be:

decomp = b''

Traceback:

Traceback (most recent call last):
...
  File "/home/jloehel/projects/github.com/**/**/.venv/lib64/python3.6/site-packages/oletools/olevba.py", line 2704, in __init__
    self.open_ppt()
  File "/home/jloehel/projects/github.com/**/**/.venv/lib64/python3.6/site-packages/oletools/olevba.py", line 3018, in open_ppt
    for vba_data in ppt.iter_vba_data():
  File "/home/jloehel/projects/github.com/**/**/.venv/lib64/python3.6/site-packages/oletools/ppt_parser.py", line 1147, in wrapped
    for result in func(self, self._open_main_stream, *args, **kwargs):
  File "/home/jloehel/projects/github.com/**/**/.venv/lib64/python3.6/site-packages/oletools/ppt_parser.py", line 1604, in iter_vba_data
    yield self.decompress_vba_storage(storage)
  File "/home/jloehel/projects/github.com/**/**/.venv/lib64/python3.6/site-packages/oletools/ppt_parser.py", line 1114, in wrapped
    return func(self, self._open_main_stream, *args, **kwargs)
  File "/home/jloehel/projects/github.com/**/**/.venv/lib64/python3.6/site-packages/oletools/ppt_parser.py", line 1555, in decompress_vba_storage
    iterative_decompress(stream, storage.data_size)
  File "/home/jloehel/projects/github.com/**/**/.venv/lib64/python3.6/site-packages/oletools/ppt_parser.py", line 1624, in iterative_decompress
    decomp += decompressor.decompress(stream.read(n_new))
TypeError: must be str, not bytes

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions