Skip to content

Scanning GovCloud for all Services Ends in JSON Serialization Error, Truncated Output #62

Description

@olivereri
  • Version: 1.1.1
  • Local OS Version: Ubuntu 20.04.5 LTS
  • Local chip architecture: x86_64
  • Reproduces in: 432896750513

Steps to Reproduce:

  1. python3 scan.py -s scan/sample/all_services.json -r us-gov-west-1

output:

INFO:__main__:Finished processing for region: us-gov-west-1
ERROR:__main__:'us-gov-west-1' generated an exception: Object of type bytes is not JSON serializable
ERROR:__main__:Traceback (most recent call last):
  File "scan.py", line 334, in main
    json.dump(service_result["result"], f, cls=DateTimeEncoder)
  File "/usr/lib/python3.8/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/usr/lib/python3.8/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/lib/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.8/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/usr/lib/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.8/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "scan.py", line 44, in default
    return super().default(o)
  File "/usr/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type bytes is not JSON serializable

Total elapsed time for scanning: 0h:31m:1s

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions