Reading other question I did some test without any success.
Tested if Chrome is installed.
qatrack@qatrack-server:/var/log/apache2$ which google-chrome
/usr/bin/google-chrome
qatrack@qatrack-server:/var/log/apache2$ which chromium-browser
qatrack@qatrack-server:/var/log/apache2$ google-chrome --version
Google Chrome 135.0.7049.114
qatrack@qatrack-server:/var/log/apache2$
I did the permission
sudo chown -R www-data:www-data /home/qatrack/web/qatrackplus/qatrack/{media,static,cache}
sudo chmod -R ug+rwxs /home/qatrack/web/qatrackplus/qatrack/{media,static,cache}
looked /var/log/apache2/error.log
[Wed May 14 09:55:23.600709 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] File "/home/qatrack/web/qatrackplus/qatrack/qa/ views/review.py", line 93, in test_list_instance_report
[Wed May 14 09:55:23.600713 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] return report.render_to_response(base_opts['r eport_format'])
[Wed May 14 09:55:23.600720 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] File "/home/qatrack/web/qatrackplus/qatrack/rep orts/reports.py", line 131, in render_to_response
[Wed May 14 09:55:23.600725 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] fname, content = self.render(report_format)
[Wed May 14 09:55:23.600730 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] File "/home/qatrack/web/qatrackplus/qatrack/rep orts/reports.py", line 122, in render
[Wed May 14 09:55:23.600734 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] content = getattr(self, "to_%s" % report_form at)()
[Wed May 14 09:55:23.600739 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] File "/home/qatrack/web/qatrackplus/qatrack/rep orts/reports.py", line 263, in to_pdf
[Wed May 14 09:55:23.600743 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] return chrometopdf(content, name=fname)
[Wed May 14 09:55:23.600748 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] File "/home/qatrack/web/qatrackplus/qatrack/qat rack_core/utils.py", line 52, in chrometopdf
[Wed May 14 09:55:23.600752 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] if not out_file.closed:
[Wed May 14 09:55:23.600757 2025] [wsgi:error] [pid 2316313:tid 139342657824448] [remote
192.168.10.112:57529] UnboundLocalError: local variable 'out_file' refe renced before assignment
I set `DEBUG = True` in local_settings.py
UnboundLocalError at /qc/session/details/1784/report/
local variable 'out_file' referenced before assignment
Request Method:
GET
Request URL:
http://192.168.10.11/qc/session/details/1784/report/?type=pdfDjango Version:
2.2.18
Exception Type:
UnboundLocalError
Exception Value:
local variable 'out_file' referenced before assignment
Exception Location:
/home/qatrack/web/qatrackplus/qatrack/qatrack_core/utils.py in chrometopdf, line 52
Python Executable:
/home/qatrack/venvs/qatrack31/bin/python
Python Version:
3.9.22
Python Path:
['/home/qatrack/web/qatrackplus',
'/usr/lib/python39.zip',
'/usr/lib/python3.9',
'/usr/lib/python3.9/lib-dynload',
'/home/qatrack/venvs/qatrack31/lib/python3.9/site-packages']
Server time:
Wed, 14 May 2025 10:09:51 -0400