Skip to content

Geocoder plugin: UnboundLocalError #120

@mklaber

Description

@mklaber

If an exception occurs after the try but before loc declaration here, the catch fails with:

[15:11:22] [INFO] [dku.utils]  - *************** Recipe code failed **************
[15:11:22] [INFO] [dku.utils]  - Begin Python stack
[15:11:22] [INFO] [dku.utils]  - Traceback (most recent call last):
[15:11:22] [INFO] [dku.utils]  -   File "/mnt/secondary/dataiku_data/jobs/some_project/custom-python-recipe/pyout10LvN4CWhlPW/python-exec-wrapper.py", line 6, in <module>
[15:11:22] [INFO] [dku.utils]  -     exec(f.read())
[15:11:22] [INFO] [dku.utils]  -   File "<string>", line 192, in <module>
[15:11:22] [INFO] [dku.utils]  -   File "<string>", line 158, in main
[15:11:22] [INFO] [dku.utils]  -   File "<string>", line 126, in perform_geocode_batch
[15:11:22] [INFO] [dku.utils]  - UnboundLocalError: local variable 'loc' referenced before assignment

This renders line 111's raise useless.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions