Troubleshooting¶
Wikidata¶
Queries are slow, time out, or fail with HTTP 429¶
The Wikidata Query Service is a free, shared service with limits: each query
may run for at most 60 seconds, and clients that send too much get
429 Too Many Requests and have to wait. During busy periods or outages,
Wikimedia sometimes lowers these limits further.
- Use
LIMITwhile exploring, and start queries from specific items (wd:Q41264) rather than from whole classes (all paintings). - Give the profile a
timeoutof up to 60 seconds; waiting longer doesn't help. - Remember that every live block on a story page (SPARQL tables, IIIF queries, Graph Explorer clicks, embedded query views) is a request. A page with many of them, read by many people, adds up. Charts and maps don't query when they're read.
- Check the Wikidata Query Service status when everything fails at once.
Requests are blocked¶
Wikimedia requires a descriptive User-Agent with contact details. Set it in the profile:
headers:
User-Agent: "my-shmarql-site/1.0 (https://example.org/; webmaster@example.org)"
or for all profiles with SPARQL_USER_AGENT.
The entity viewer is slow or times out¶
Use the simple construct_query and show_inverse_relations: false from the
example profile. Famous items have a very
large number of incoming links.
Profiles¶
| Symptom | Cause and fix |
|---|---|
| Unknown SPARQL profile (404) | The key in /sparql/<key> doesn't exist. Keys change when the endpoint address changes; list them with uv run shmarql profiles. |
| No default SPARQL profile configured | No profiles file was found. Check PROFILES_PATH, or set ENDPOINT. |
SHMARQL doesn't start and the log ends with a ProfileError |
The profiles YAML has an error, for example two profiles with the same endpoint, or a profile without endpoint. The message says which. uv run shmarql profiles shows the same message (Invalid profiles configuration: …). |
| A story's SPARQL block says the profile is not found | kg="…" must be a profile name (or key). Rename the profile, or change kg. |
Data stories¶
An embed says "The remote embed URL is not allowed"¶
The site of the URL isn't in nodes.embed.allowedOrigins. Add its origin
(scheme and host, for example https://query.wikidata.org) to the file named by
LODEON_CONFIG_PATH and restart SHMARQL. If the frame then stays empty, the
other site may refuse to be framed (X-Frame-Options or frame-ancestors).
That can only be changed by that site. If its page needs JavaScript, add
allow-scripts to nodes.embed.sandbox.
A IIIF viewer stays empty¶
The browser loads manifests and images directly from the IIIF server. Open the
browser's developer console: a CORS error means that server doesn't allow
cross-origin requests, and nothing on the SHMARQL side can fix that. Use
another server or manifest. Plain http:// manifests are refused as well; IIIF
nodes need HTTPS (the editor refuses http:// URLs, and browsers block them on
HTTPS sites).
A map or music block shows an error message¶
The JSON of the block didn't pass validation (for example a missing setting, an
unknown tileLayerId, or coordinates out of range). Make the node in the
editor and copy the block it writes. See
The Markdown format.
The Graph Explorer shows only one or two neighbours on Wikidata¶
A known limitation: the expansion query fetches the neighbours' labels in every language, and on Wikidata those rows use up the query's row limit. Each click still adds a node, so you can explore step by step. Endpoints with labels in one or a few languages work as expected.
A Markdown page shows a live map where I wanted to show its source code¶
SHMARQL turns map, graph, embed and music blocks into HTML before the rest
of the Markdown is processed. It also does that inside other code blocks.
To show such a block as an example, write it in an HTML <pre><code> block
with the backticks written as ```, as on
The Markdown format.
The story editor¶
| Symptom | Cause and fix |
|---|---|
| Publish is greyed out or asks for a login | Publishing needs LODEON_EDITOR_TOKEN to be set on the server, and you must Login with it. |
| Publishing fails with a permission error | SHMARQL needs write access to DOCS_PATH/story/. In Docker, don't mount the docs folder read-only. |
| My projects are gone | Projects live in the browser. Another browser, a private window or cleared site data shows a different, empty store. Import your last exported .lodeon.zip. |
| The Visual Query Builder button is missing | The profile has no sparnatural: file, or the file can't be read. Check /api/knowledge-graphs/<name>/sparnatural. |
| The builder's query returns nothing on Wikidata | The class shapes need an sh:target with wdt:P31, because Wikidata doesn't use rdf:type. See the Visual Query Builder configuration. |
| An upload is refused | It is larger than LODEON_MAX_UPLOAD_MB (100 MB by default), or not a supported image, audio or video type. |
| The preview link stopped working | Previews are removed after LODEON_PREVIEW_TTL seconds (one hour). Preview again. |