The ORES command line utility seems to hang fairly often for me.
This occurs when I enter the following command on a machine running Ubuntu 14.04.5:
cat <input json lines file> | \ ores score_revisions https://ores.wikimedia.org wikidatawiki itemquality --verbose \ > <output json lines file>
Below is the traceback after I hit ctrl-c. I'm happy to provide any additional details as needed!
File "/export/scratch2/wmf/scripts/venv/lib/python3.4/site-packages/ores/api.py", line 108, in _score_request doc = response.json() File "/export/scratch2/wmf/scripts/venv/lib/python3.4/site-packages/requests/models.py", line 866, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.4/json/__init__.py", line 318, in loads return _default_decoder.decode(s) File "/usr/lib/python3.4/json/decoder.py", line 343, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.4/json/decoder.py", line 361, in raw_decode raise ValueError(errmsg("Expecting value", s, err.value)) from None ValueError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/export/scratch2/wmf/scripts/venv/lib/python3.4/site-packages/ores/api.py", line 92, in _score for score in future.result(): File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result return self.__get_result() File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/export/scratch2/wmf/scripts/venv/lib/python3.4/site-packages/ores/api.py", line 110, in _score_request raise RuntimeError("Non-json response: " + response.text[:100]) RuntimeError: Non-json response: <!DOCTYPE html> <html lang=en> <meta charset=utf-8> <title>Wikimedia Error</title> <style> * { margi During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/export/scratch2/wmf/scripts/venv/bin/ores", line 11, in <module> sys.exit(main()) File "/export/scratch2/wmf/scripts/venv/lib/python3.4/site-packages/ores/ores.py", line 55, in main module.main(sys.argv[2:]) File "/export/scratch2/wmf/scripts/venv/lib/python3.4/site-packages/ores/utilities/score_revisions.py", line 63, in main run(ores_host, context, model_names, input, output, verbose) File "/export/scratch2/wmf/scripts/venv/lib/python3.4/site-packages/ores/utilities/score_revisions.py", line 73, in run for rev_doc, score_doc in zip(rev_docs, scores): File "/export/scratch2/wmf/scripts/venv/lib/python3.4/site-packages/ores/api.py", line 93, in _score yield score File "/usr/lib/python3.4/concurrent/futures/_base.py", line 574, in __exit__ self.shutdown(wait=True) File "/usr/lib/python3.4/concurrent/futures/thread.py", line 131, in shutdown t.join() File "/usr/lib/python3.4/threading.py", line 1060, in join self._wait_for_tstate_lock() File "/usr/lib/python3.4/threading.py", line 1076, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt ^CError in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python3.4/concurrent/futures/thread.py", line 38, in _python_exit t.join() File "/usr/lib/python3.4/threading.py", line 1060, in join self._wait_for_tstate_lock() File "/usr/lib/python3.4/threading.py", line 1076, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt ^C foreach ($list as $item) { work_miracles($item); }