Submodule that can be used to validate a datapackage.json file for datasets. To use it just include it in the root of your dataset repository as submodule. You can then execute it using python3 running the file 'validate-datapackage.py'. The script will automatically look for the datapackage.json in the root of the repository.
0
stars
1
forks
source link
Fix: NameError: name 'dp_profile' is not defined #5
Traceback (most recent call last):
File "datapackage-validation/validate_datapackage.py", line 87, in <module>
if dp_profile == 'vector-data-resource':
NameError: name 'dp_profile' is not defined
If an exception is raised because the "profile" is missing, then the variable dp_profile is never instanced.
# profile
try:
dp_profile = dp['profile']
except:
missing_properties.append('profile')
# [...] snip
# check resources attributes
if dp_resources:
if dp_profile == 'vector-data-resource':
for dp_r in dp_resources:
# etc. [...]
I got the following error:
If an exception is raised because the
"profile"
is missing, then the variabledp_profile
is never instanced.