Page MenuHomePhabricator

Unsupported syntax in `columns` field results in uncaught `AttributeError` exception
Closed, ResolvedPublic

Description

Trying to create a property dashboard with the query below fails with the below error.

{{Property dashboard
|selector_sparql=wdt:P31 wd:Q19844914; wdt:P5008 wd:Q104665671 SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
|grouping_property=P17
|grouping_threshold=0
|stats_for_no_group=TRUE
|properties=P18,Len:Label,Den:Description,Aen:Alias,P276,P17,P131,P625,P6375,P2846
}}
{{Property dashboard end}}

error:

Something catastrophic happened when processing page 
Wikidata:WikiProject_PCC_Wikidata_Pilot/Northwestern_University_Libraries/NU-Buildings-Dash

This is very likely a bug in inteGraality itself, not a configuration issue.

<class 'AttributeError'> 'NoneType' object has no attribute 'get_key'

Event Timeline

JeanFred triaged this task as Medium priority.
JeanFred added a subscriber: JeanFred.

Thanks for reporting this!

There are two issues here:

  1. Aen is not valid syntax. There is currently no support for aliases
  2. invalid syntax in columns was not properly caught

Let’s discuss 1. separately at T284684: Support for aliases. Here I would like to improve 2.

I can see two way forward:

  1. the invalid bits in columns are ignored, the rest is processed normally. In the example above, there would be 9 columns instead of 10, with nothing between Den:Description and P276
  2. integraality throws an error when encountering any invalid syntax in columns and will not update the dashboard at all.

I’m not sure which course of action is best. Thoughts?

JeanFred renamed this task from <class 'AttributeError'> 'NoneType' object has no attribute 'get_key' to Unsupported syntax in `columns` field results in uncaught `AttributeError` exception.Jun 9 2021, 6:23 PM

I went for option 2, “integraality throws an error when encountering any invalid syntax in columns and will not update the dashboard at all.”