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

Error in harvesting (license) #170

Open
etj opened this issue Mar 22, 2018 · 4 comments
Open

Error in harvesting (license) #170

etj opened this issue Mar 22, 2018 · 4 comments

Comments

@etj
Copy link
Member

etj commented Mar 22, 2018

Only happens when the license vocabulary is not loaded

2018-03-22 08:48:54,458 INFO  [ckanext.harvest.model] Error when processsing dataset: AttributeError("'NoneType' object has no attribute 'uri'",) / Traceback (most recent call last):
  File "/usr/lib/ckan/default/src/ckanext-dcat/ckanext/dcat/harvesters/rdf.py", line 209, in gather_stage
    for dataset in parser.datasets():
  File "/usr/lib/ckan/default/src/ckanext-dcat/ckanext/dcat/processors.py", line 181, in datasets
    profile.parse_dataset(dataset_dict, dataset_ref)
  File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/dcat/profiles.py", line 330, in parse_dataset
    resource_dict['license_type'] = license_type.uri
AttributeError: 'NoneType' object has no attribute 'uri'
@giorgialodi
Copy link

Hi all, I am getting a similar error when harvesting a specific PA (for which a previous haversting was working fine). The error I have is the following:
Error when processsing dataset: AttributeError("'Query' object has no attribute 'where'",) / Traceback (most recent call last): File "/usr/lib/ckan/default/src/ckanext-dcat/ckanext/dcat/harvesters/rdf.py", line 209, in gather_stage for dataset in parser.datasets(): File "/usr/lib/ckan/default/src/ckanext-dcat/ckanext/dcat/processors.py", line 181, in datasets profile.parse_dataset(dataset_dict, dataset_ref) File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/dcat/profiles.py", line 352, in parse_dataset **names) File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/interfaces.py", line 321, in get_license_from_dcat l = License.get_by_lang(lang, name) File "/usr/lib/ckan/default/src/ckanext-dcatapit/ckanext/dcatapit/model/license.py", line 188, in get_by_lang LocalizedLicenseName.license_id == cls.id)\ AttributeError: 'Query' object has no attribute 'where’

Do you think the two errors share the same reason? @etj @tdipisa @cezio

@tdipisa
Copy link
Member

tdipisa commented Nov 5, 2018

@giorgialodi, I'm not sure but it could be. This kind of exceptions usually require some debug.

@giorgialodi
Copy link

@tdipisa thanks for the reply. I need to better understand it otherwise I am not able to harvest an important PA. I am doing another check at the moment. I will let you know

@giorgialodi
Copy link

The PA said to me that they are able to load correctly the licence vocabulary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants