Skip to content

Commit 7804a88

Browse files
committed
remove warnings from example
1 parent a77b2e8 commit 7804a88

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

example/example.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
CheckResult, GraphicFieldType
77

88
host = os.getenv("API_BASE_PATH", "http://localhost:8080")
9-
license = os.getenv("TEST_LICENSE", None) # optional, used here only for smoke test purposes
9+
regula_license = os.getenv("TEST_LICENSE", None) # optional, used here only for smoke test purposes
1010

1111
# read optional local license file
1212
if os.path.isfile('regula.license') and os.access('regula.license', os.R_OK):
1313
with open("regula.license", "rb") as f:
1414
print("Found local license file. Using it for performing request...")
15-
license = f.read()
15+
regula_license = f.read()
1616

1717
with open("australia_passport.jpg", "rb") as f:
1818
input_image = f.read()
1919

2020
with DocumentReaderApi(host) as api:
21-
api.license = license
21+
api.license = regula_license
2222

2323
params = ProcessParams(
2424
scenario=Scenario.FULL_PROCESS,
@@ -43,11 +43,10 @@
4343
document_image = response.images.document_image()
4444
portrait_field = response.images.get_field(GraphicFieldType.PORTRAIT)
4545
portrait_from_visual = portrait_field.get_value(Source.VISUAL)
46-
with open('portrait.jpg', 'wb') as f: f.write(portrait_from_visual)
47-
with open('document-image.jpg', 'wb') as f: f.write(document_image)
48-
49-
# low-lvl(original) response
50-
response.low_lvl_response
46+
with open('portrait.jpg', 'wb') as f:
47+
f.write(portrait_from_visual)
48+
with open('document-image.jpg', 'wb') as f:
49+
f.write(document_image)
5150

5251
print("""
5352
---------------------------------------------------------------------------

0 commit comments

Comments
 (0)