Luigi: Task History Not Working

Created on 29 Mar 2016  路  9Comments  路  Source: spotify/luigi

I have this config in path /etc/luigi/client.cfg :

[scheduler]
record_task_history = True
[task_history]
db_connection = sqlite:///data/sqlite/luigi-task-hist.db

I keep getting this error in central scheduler logs when I refresh page /history :

File "/usr/lib/python2.7/site-packages/luigi/server.py", line 170, in get
tasks = self._scheduler.task_history.find_latest_runs()
AttributeError: 'NopHistory' object has no attribute 'find_latest_runs'

Most helpful comment

Have same problem. Where can I find the luigid error log please?

All 9 comments

I'm having the exact same problem.
Any clue?

@jumanSalameh did you solve the issue?

Hi!

just in case someone run on this error again,

I was not aware that luigid has an error log.

There it was a clear message about my error cause. In my case, I was using a mysql database with pymysql driver for storing Task history, and I didnt have pymysql installed on the scheduler node.

Thanks for reporting this. @jumanSalameh can you verify if the same solution works for you? If so we can close this issue.

@Tarrasch Yes the problem was solved! I will close the issue now.
@fjavieralba I am so sorry I just saw this!

Have same problem. Where can I find the luigid error log please?

Hi, I've the same issue, I'm trying to use sqlite. Should I've to install the pysqlite module ?

You should only need the sqlalchemy module when using sqlite.

@fjavieralba where did you find log error ?
I only see luigi-server.log

it said

2019-04-25 11:08:20,861 tornado.access[56819] ERROR: 500 GET /history (ip) 1.07ms
2019-04-25 11:08:21,082 tornado.application[56819] ERROR: Uncaught exception GET /history (ip)
HTTPServerRequest(protocol='http', host='ip:port', method='GET', uri='/history', version='HTTP/1.1', remote_ip='ip')
Traceback (most recent call last):
  File "/home/h/anaconda3/lib/python3.6/site-packages/tornado/web.py", line 1541, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/home/h/anaconda3/lib/python3.6/site-packages/luigi/server.py", line 160, in get
    tasks = self._scheduler.task_history.find_latest_runs()
AttributeError: 'NopHistory' object has no attribute 'find_latest_runs'
2019-04-25 11:08:21,083 tornado.access[56819] ERROR: 500 GET /history (ip) 1.07ms

I have the very same problem, installed all these libraries (tornado, sqlalchemy, pymysql), but it didn't help. do you maybe have any ideas what could help?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gioelelm picture gioelelm  路  5Comments

birdcolour picture birdcolour  路  4Comments

colemanja91 picture colemanja91  路  7Comments

ocschwar picture ocschwar  路  3Comments

AndresUrregoAngel picture AndresUrregoAngel  路  4Comments