Parallels/rq-dashboard

ValueError: time data '' does not match format '%Y-%m-%dT%H:%M:%SZ'

Opened this issue · 1 comments

In my dashboard, whenever I try to view queues I often get this error.

It results in me not being able to access any of the job queues, but the "Successful" jobs queue does work and list jobs correctly in the 0.6.0 branch (the default docker image).

Here's the full stack trace

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/rq_dashboard/web.py", line 114, in _wrapped
    result_dict = f(*args, **kwargs)
  File "/rq_dashboard/web.py", line 328, in list_jobs
    queue_jobs = queue.get_jobs(offset, per_page)
  File "/usr/local/lib/python3.7/site-packages/rq/queue.py", line 166, in get_jobs
    return compact([self.fetch_job(job_id) for job_id in job_ids])
  File "/usr/local/lib/python3.7/site-packages/rq/queue.py", line 166, in <listcomp>
    return compact([self.fetch_job(job_id) for job_id in job_ids])
  File "/rq_dashboard/compat.py", line 62, in fetch_job
    return self.job_class.fetch(job_id, connection=self.connection)
  File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 288, in fetch
    job.refresh()
  File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 462, in refresh
    self.restore(data)
  File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 434, in restore
    self.ended_at = str_to_date(obj.get('ended_at'))
  File "/usr/local/lib/python3.7/site-packages/rq/utils.py", line 259, in str_to_date
    return utcparse(as_text(date_str))
  File "/usr/local/lib/python3.7/site-packages/rq/utils.py", line 175, in utcparse
    return datetime.datetime.strptime(string, '%Y-%m-%dT%H:%M:%SZ')
  File "/usr/local/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/local/lib/python3.7/_strptime.py", line 359, in _strptime
    (data_string, format))
ValueError: time data '' does not match format '%Y-%m-%dT%H:%M:%SZ'

I'm using:

  • Redis 5.0
  • PythonRQ 1.5.1
  • Running the docker image directly, I tried legacy, default, and v0.6.3 all with same issue.

Do I need to downgrade redis or pythonRQ? I can see the dashboard states it uses pythonRQ 1.1.0