Skip to content

undefined variable in _iter_from_tabulator function #96

Closed
@ndkv

Description

@ndkv

The value variable on line 325 in resource.py is undefined.

I encountered it while running the example code in the README.

import datapackage

dp = datapackage.DataPackage('http://data.okfn.org/data/core/gdp/datapackage.json')
brazil_gdp = [{'Year': int(row['Year']), 'Value': float(row['Value'])}
              for row in dp.resources[0].data if row['Country Code'] == 'BRA']

This throws a NameError for value in the _iter_from_tabulator function. Note: this error is not caught by Travis.

I'm not familiar with jsontableschema and can't quickly see how to fix this. Any help is greatly appreciated as I'd like to address #63.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions