inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.22k stars 760 forks source link

InvenTree 0.15.6 can't call the camera from ipad/iphone safari browser in website. #7723

Closed zly20129 closed 2 weeks ago

zly20129 commented 2 months ago

Please verify that this bug has NOT been raised before.

Describe the bug*

Steps to Reproduce

  1. Install Inventree-server on docker byMy Docker Installer Step
  2. Open website by iphone or ipad safari browser.
  3. Click barcode icon in top.
  4. You can see, it not ask user to get cam-permission.
  5. Web-barcode-scan function is missing.

Expected behaviour

Can scan barcode by browser.

Deployment Method

Version Information

InvenTree-Version: 0.15.6 Django Version: 4.2.14 Commit Hash: 23a9485 Commit Date: 2024-07-23 Database: postgresql Debug-Mode: False Deployed using Docker: True Platform: Linux-5.4.0-189-generic-x86_64-with Installer: DOC

Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.0.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}]

Please verify if you can reproduce this bug on the demo site.

Relevant log output

None log information.
matmair commented 2 months ago

Modern Safari limits the usage of device-level web APIs to websites that either use https or are running as localhost. @zly20129 Is your website server with TLS / HTTPS set up?

zly20129 commented 2 months ago

Modern Safari limits the usage of device-level web APIs to websites that either use https or are running as localhost. @zly20129 Is your website server with TLS / HTTPS set up?

I tried setting up HTTPS access, but I failed because the server wouldn't start after setting up HTTPS.

INVENTREE_SITE_URL="https://1.1.1.13"

I saw documentation that says HTTP or HTTPS is set by INVENTREE_SITE_URL, so I set it: INVENTREE_SITE_URL="https://1.1.1.13". And then deleted the environment variable that specifies HTTP port 80, but after reboot, InvenTree doesn't work properly.

Logs is in follos: `return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create label 'QR and text' with error 'the connection is closed' Failed to query label for 'label/inventree/part/part_label.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create label 'Part Label' with error 'the connection is closed' Failed to query label for 'label/inventree/part/part_label_code128.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create label 'Barcode Part Label' with error 'the connection is closed' Failed to query label for 'label/inventree/buildline/buildline_label.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create label 'Build Line Label' with error 'the connection is closed' Failed to set maintenance mode state Failed to reset pricing flags - database not ready Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/part/apps.py", line 68, in reset_part_pricing_flags if items.count() > 0: ^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 608, in count return self.query.get_count(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 568, in get_count return obj.get_aggregation(using, {"count": Count("*")})["count"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 554, in get_aggregation result = compiler.execute_sql(SINGLE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to query report for 'report/inventree/test/inventree_test_report.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create report 'InvenTree Test Report' with error 'the connection is closed' Failed to query report for 'report/inventree/build/inventree_build_order.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create report 'InvenTree Build Order' with error 'the connection is closed' Failed to query report for 'report/inventree/bom/inventree_bill_of_materials_report.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create report 'Bill of Materials' with error 'the connection is closed' Failed to query report for 'report/inventree/purchaseorder/inventree_po_report.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create report 'InvenTree Purchase Order' with error 'the connection is closed' Failed to query report for 'report/inventree/salesorder/inventree_so_report.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create report 'InvenTree Sales Order' with error 'the connection is closed' Failed to query report for 'report/inventree/returnorder/inventree_return_order_report.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create report 'InvenTree Return Order' with error 'the connection is closed' Failed to query report for 'report/inventree/slr/inventree_slr_report.html' - you should run 'invoke update' first! Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/generic/templating/apps.py", line 118, in create_template_file if model.objects.filter({self.db: filename}).exists(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1241, in exists return self.query.has_results(using=self.db) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/query.py", line 598, in has_results return compiler.has_results() ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results return bool(self.execute_sql(SINGLE)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Failed to create report 'InvenTree Stock Location' with error 'the connection is closed' Failed to set maintenance mode state Database was not ready for initializing machines Failed to remove obsolete tasks - database not ready Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/inventree/src/backend/InvenTree/InvenTree/apps.py", line 86, in remove_obsolete_tasks Schedule.objects.filter(funcin=obsolete).delete() File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1147, in delete collector.collect(del_query) File "/root/.local/lib/python3.11/site-packages/django/db/models/deletion.py", line 284, in collect new_objs = self.add( ^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/deletion.py", line 126, in add if not objs: File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 412, in bool self._fetch_all() File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all self._result_cache = list(self._iterable_class(self)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 91, in iter results = compiler.execute_sql( ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") psycopg.OperationalError: the connection is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/root/.local/bin/gunicorn", line 8, in sys.exit(run()) ^^^^^ File "/root/.local/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 67, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run() File "/root/.local/lib/python3.11/site-packages/gunicorn/app/base.py", line 236, in run super().run() File "/root/.local/lib/python3.11/site-packages/gunicorn/app/base.py", line 72, in run Arbiter(self).run() ^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 58, in init self.setup(app) File "/root/.local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 118, in setup self.app.wsgi() File "/root/.local/lib/python3.11/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() ^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() ^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/gunicorn/util.py", line 371, in import_app mod = importlib.import_module(module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/home/inventree/src/backend/InvenTree/InvenTree/wsgi.py", line 17, in application = get_wsgi_application() # pragma: no cover ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False) File "/root/.local/lib/python3.11/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/root/.local/lib/python3.11/site-packages/django/apps/registry.py", line 124, in populate app_config.ready() File "/home/inventree/src/backend/InvenTree/InvenTree/apps.py", line 54, in ready self.start_background_tasks() File "/home/inventree/src/backend/InvenTree/InvenTree/apps.py", line 99, in start_background_tasks for existing_task in Schedule.objects.all(): File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 398, in iter self._fetch_all() File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all self._result_cache = list(self._iterable_class(self)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/query.py", line 91, in iter results = compiler.execute_sql( ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1560, in execute_sql cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 330, in cursor return self._cursor() ^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 307, in _cursor with self.wrap_database_errors: File "/root/.local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 308, in _cursor return self._prepare_cursor(self.create_cursor(name)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/django/db/backends/postgresql/base.py", line 330, in create_cursor cursor = self.connection.cursor() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 852, in cursor self._check_connection_ok() File "/root/.local/lib/python3.11/site-packages/psycopg/connection.py", line 485, in _check_connection_ok raise e.OperationalError("the connection is closed") django.db.utils.OperationalError: the connection is closed Loading config file : /home/inventree/data/config.yaml Python version 3.11.9 - /usr/local/bin/python /root/.local/lib/python3.11/site-packages/allauth/exceptions.py:9: UserWarning: allauth.exceptions is deprecated, use allauth.core.exceptions warnings.warn("allauth.exceptions is deprecated, use allauth.core.exceptions") Loading config file : /home/inventree/data/config.yaml Python version 3.11.9 - /usr/local/bin/python /root/.local/lib/python3.11/site-packages/allauth/exceptions.py:9: UserWarning: allauth.exceptions is deprecated, use allauth.core.exceptions warnings.warn("allauth.exceptions is deprecated, use allauth.core.exceptions")`

github-actions[bot] commented 3 weeks ago

This issue seems stale. Please react to show this is still important.