Skip to content

tenable.sc.scan_instances.ScanResultAPI.import_scan - Error using "example" #960

Description

@stiong-p

Description:

From SC ScanResultAPI.import_scan
using the example:

with open('example.nessus') as fobj:
    sc.scan_instances.import_scan(fobj, 1)

would result in the error:
TypeError: a bytes-like object is required, not 'str'

What works:

with open('example.nessus', 'rb') as fobj:
sc.scan_instances.import_scan(fobj, 1)

To confirm:

Is this an incorrect example or a library issue?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions