Skip to content

AttributeError: 'Job' object has no attribute 'status' #2

@aopdal

Description

@aopdal

I'm trying out your ztp-tutorial and getting a error when I tries
the 'Handling jobs with Redis' I get this error:

############################################################
Peer: 192.168.1.4 UDP/52724
File: sample.cfg
Sent Packets: 1
############################################################
ERROR:root:Exception raised when calling _on_close: 'Job' object has no attribute 'status'
Traceback (most recent call last):
File "/opt/ztp/venv/lib/python3.6/site-packages/fbtftp/base_handler.py", line 178, in _close
self._on_close()
File "/opt/ztp/venv/lib/python3.6/site-packages/fbtftp/base_handler.py", line 169, in _on_close
self._stats_callback(self._stats)
File "ztp_tftp.py", line 53, in session_stats
trigger_job(stats.peer[0], stats.file_path)
File "/opt/ztp/app/broker.py", line 12, in trigger_job
if rq_job.status in ['finished', 'failed']:
AttributeError: 'Job' object has no attribute 'status'

The server provides the file (for debug I just did get sample.cfg from a tftp client).

I'm doing this on Ubuntu 18.04.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions