Open beniyama opened 8 years ago
Looks like default priority should be numeric, instead of None?
Oops, sorry I missed this issue. Let me check it in this weekend.
I'm getting the same error.
-my env:
test-server $ pip list | egrep "td|luigi"
luigi (2.0.1)
luigi-td (0.6.6)
td-client (0.4.1)
test-server $
test-server $ python -V
Python 3.4.4
test-server $
-script:
#tasks.py
import luigi
import luigi_td
class MyQuery(luigi_td.Query):
type = 'presto'
database = 'qyaman_test'
def query(self):
return "SELECT count(1) cnt FROM test_tbl"
if __name__ == '__main__':
luigi.run()
-error details:
test-server $ python tasks.py MyQuery --local-scheduler
DEBUG: Checking if MyQuery() is complete
/usr/local/python/lib/python3.4/site-packages/luigi/worker.py:279: UserWarning: Task MyQuery() without outputs has no custom complete() method
is_complete = task.complete()
ERROR: Luigi unexpected framework error while scheduling MyQuery()
Traceback (most recent call last):
File "/usr/local/python/lib/python3.4/site-packages/luigi/worker.py", line 525, in add
for next in self._add(item, is_complete):
File "/usr/local/python/lib/python3.4/site-packages/luigi/worker.py", line 616, in _add
module=task.task_module)
File "/usr/local/python/lib/python3.4/site-packages/luigi/worker.py", line 409, in _add_task
self._scheduler.add_task(*args, **kwargs)
File "/usr/local/python/lib/python3.4/site-packages/luigi/scheduler.py", line 661, in add_task
self._update_priority(task, priority, worker_id)
File "/usr/local/python/lib/python3.4/site-packages/luigi/scheduler.py", line 591, in _update_priority
task.priority = prio = max(prio, task.priority)
TypeError: unorderable types: NoneType() > NoneType()
INFO: Sending warning email to ['kuyama@treasure-data.com']
INFO: Not sending email when running from a tty
INFO: Done scheduling tasks
INFO: Running Worker with 1 processes
DEBUG: Asking scheduler for work...
INFO: Done
INFO: There are no more tasks to run at this time
INFO: Worker Worker(salt=895341295, workers=1, host=ip-172-31-12-212, username=root, pid=6663) was stopped. Shutting down Keep-Alive thread
INFO:
===== Luigi Execution Summary =====
Scheduled 1 tasks of which:
* 1 were left pending, among these:
* 1 were left pending because of unknown reason:
- 1 MyQuery()
Did not run any tasks
This progress looks :) because there were no failed tasks or missing external dependencies
===== Luigi Execution Summary =====
test-server $
And it occurred on Python 3.5 too.
The above was just a quick report.
Great to see the latest release, as it supports luigi 2.0!
But it fails with unorderable type comparison error as below:
The task itself is pretty simple like this
And here is my runtime environment :
Once I set
priority=2
into MyTask, the error message changes toTypeError: unorderable types: int() > NoneType()
but still be not comparable.Do you have any suggestion here? I haven't tried with td-client-python 0.4.0 as it haven't appeared at pip repository yet.