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

AttributeError: module 'redact' has no attribute 'JobArguments' #93

Open
SewarDra opened this issue Jul 9, 2023 · 0 comments
Open

AttributeError: module 'redact' has no attribute 'JobArguments' #93

SewarDra opened this issue Jul 9, 2023 · 0 comments

Comments

@SewarDra
Copy link

SewarDra commented Jul 9, 2023

When I try to use the following example from the git examples I get an error that all imported classes from redact like JobArguments,RedactInstance,ServiceType... Do not exist.

`from io import BytesIO

from matplotlib import pyplot as plt
from matplotlib.pyplot import imread

from redact import JobArguments, OutputType, RedactInstance, Region, ServiceType

def main():
# anonymize image
redact = RedactInstance.create(
service=ServiceType.blur,
out_type=OutputType.images,
redact_url="http://127.0.0.1:8787",
)
job_args = JobArguments(region=Region.united_states_of_america)
with open("tests/resources/obama.jpeg", "rb") as f:
job = redact.start_job(file=f, job_args=job_args)
result = job.wait_until_finished().download_result()

# show anonymized image
img = imread(BytesIO(result.content), format="jpg")
plt.imshow(img)
plt.show()

if name == "main":
main()`

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

No branches or pull requests

1 participant