You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Surprise, but I found a solution faster than expected! ;-)
It seems that in "rq" the name for the status arguement has changed to "get_status".
So you have to change the code in broker.py from if rq_job.status in ['finished', 'failed']:
to if rq_job.get_status in ['finished', 'failed']:
Sebastian
PS: Great tutorial! Thanks a lot for the work, Patrick!
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
The text was updated successfully, but these errors were encountered: