Closed rbange closed 5 months ago
Hello @Hannes221, I see that the issue is completed but I am having the same error using the latest version (https://pypi.org/project/rq-dashboard-fast/0.5.2/). Do you think I should add some modification to my code or use another version?
My code looks like this:
# RQ-Dashboard
redis_url = f"redis://{REDIS_HOST}:{REDIS_PORT}/"
dashboard = RedisQueueDashboard(redis_url, "/rq")
app.mount("/rq", dashboard)
Note: The rest of the tabs work fine, only the error appears in "/jobs
"
Thanks in advance
Hi, @dtomas1989. I am not able to replicate the problem with your setup. Can you share the error message with me?
Hello @Hannes221, the error in the browser looks like this:
As I mentioned before, the error only appears in "/jobs
" the rest of the tabs work fine.
And the error from the console is:
File "/usr/local/lib/python3.12/site-packages/rq_dashboard_fast/utils/jobs.py", line 198, in get_jobs
logger.exception("Error fetching job data: ", error)
Message: 'Error fetching job data: '
Arguments: (TypeError("str() argument 'encoding' must be str, not AttributeError"),)
logger.exception("An error occurred reading jobs data template:", e)
status_code=500, detail=str("Error fetching job data: ", error)
Thanks in advance
Could you try again with the newest release and send me the error message? Thank you!
Hi @Hannes221, this is the error using the newest release (https://pypi.org/project/rq-dashboard-fast/0.5.4/):
File "/usr/local/lib/python3.12/site-packages/rq_dashboard_fast/utils/jobs.py", line 120, in get_job_registrys
status = job.get_status()
AttributeError: 'NoneType' object has no attribute 'get_status'
Thanks to you!
Hello @Hannes221 , I've already solved the problem. For some reason I was getting a job like None
in the job list (https://github.com/Hannes221/rq-dashboard-fast/blob/main/rq_dashboard_fast/utils/jobs.py#L120). Adding the following line works (as a temporary solution to verify the error).
if job is None:
continue
I will investigate why that job came to me as None
from the database.
Thanks for your help
Thank you @dtomas1989. This should be resolved in the newest release.
My implementation: