-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I interrupted wikidata-update (twice) and that appears to have tried to send off a zero-size batch, which caused a division by zero.
getafix scripts> qlever update-wikidata --host-name localhost --port 7001 --access-token ""
To enable autocompletion, run the following command, and consider adding it to your `.bashrc` or `.zshrc`:
eval "$(register-python-argcomplete qlever)" && export QLEVER_ARGCOMPLETE_ENABLED=1
Invoking command `update-wikidata` without a Qleverfile. You have to specify all required arguments on the command line. This is possible, but not recommended.
Command: update-wikidata
SINCE=$(curl -s http://localhost:7001 -H "Accept: text/csv" -H "Content-type: application/sparql-query" --data "PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX schema: <http://schema.org/> SELECT * WHERE { { SELECT (MIN(?date_modified) AS ?updates_complete_until) { wikibase:Dump schema:dateModified ?date_modified } } UNION { wikibase:Dump wikibase:updatesCompleteUntil ?updates_complete_until } } ORDER BY DESC(?updates_complete_until) LIMIT 1" | sed 1d)
Process SSE stream from https://stream.wikimedia.org/v2/stream/rdf-streaming-updater.mutation.v2?since=$SINCE in batches of 100,000 messages (less if a message is encountered that is within 1 second of the current time)
Press Ctrl+C to finish the current batch and end gracefully, press Ctrl+C again to continue with the next batch
SINCE=2025-11-24T23:03:51Z
Ctrl+C pressed, will finish the current batch and then exit [press Ctrl+C again to continue]
Processing batch #1 with 37,399 messages, date range: 2025-11-24T23:03:51Z - 2025-11-25T01:43:53Z [assembly time: 18,097 ms, min delta to NOW: 1,336,238 s]
curl -s -X POST http://localhost:7001 -H 'Authorization: Bearer ' -H 'Content-Type: application/sparql-update' --data-binary @update.sparql.1
Error parsing JSON result: Expecting value: line 1 column 1 (char 0), the first 1000 characters are:
Authorization header doesn't start with "Bearer ".
Waiting 3600 seconds before processing the next batch
An unexpected error occurred: float division by zero
Traceback (most recent call last):
File "/home/pfps/.local/lib/python3.13/site-packages/qlever/qlever_main.py", line 38, in main
command_successful = command_object.execute(args)
File "/home/pfps/.local/lib/python3.13/site-packages/qlever/commands/update_wikidata.py", line 567, in execute
time_us_per_op = int(1e6 * total_time_s / total_num_ops)
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels