From nobody Sat Jul 13 08:22:09 2024 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WLhJy65Xtz5QG1h for ; Sat, 13 Jul 2024 08:22:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WLhJy2X91z570k for ; Sat, 13 Jul 2024 08:22:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720858930; a=rsa-sha256; cv=none; b=lSCCI6GzFp8Qk7SRD6q8+T3TVFyUSuyvvvbaz/DloE7dfz3dlw8F9a6usTw34D0jZFoiDw nhJPywmN3Hmzte4IUwDlJHHBVlKvnQNvgoizR9p3iHtI4eN56pEjIocbezKsHC4LbQexgc BRd8t0BdlyMqcq2OlwZHXt4AwuLofQwbUmKoU6ZjITpnFNRp9MTjJirFTj40M/3A/1yLpz zqZgiUDeCqe3DzvAHpZmy17ab5p7dqZfM+oi0WPxygivQD6D96iqoH0of8kmS29XSd47Ud HL61uHjjsDHxCYBhRLN3pL9sznB0DULUgaDy51IVNf+xqbLjVucrn+Cqs5X8UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720858930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SShSz3FwxwJzDTuJvNGz7EFGfIjeXVmZo4Mk5Q+BFOg=; b=KuYxIB1FXcEEpbXtkhmWWNyejReiGBeoonq9zWuf8TkvNRzRrre8r+tSmPwy9Z2v1NEYSx hyA81zV4+qvqh22Th2YpYQ/SM9eK9TCcqecULES7dIq4GPHFEjnTNtPchClt828bqVxDSL cJHtlJKg/6ho1dizJ2t2a6KB+H3FIgg9/FiUdfYr1gdT8imGSICRmER1XI5m+aBJhMLdjb 0XJnCfav3Kp8aaN6ZYyecA+uRybwMmHgwpDelUSI8HQ2gT8PB1tRC6m1unAF6xx5Ki30e+ 3YeSvledIPSCxzOCMqNpGNmyXwmx6/hkDsUg/lbcXkFEI0Siu/islWNRfTNamg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WLhJy1FLQzK1b for ; Sat, 13 Jul 2024 08:22:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 46D8MAsb077729 for ; Sat, 13 Jul 2024 08:22:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 46D8MADE077728 for ports-bugs@FreeBSD.org; Sat, 13 Jul 2024 08:22:10 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 280254] net-mgmt/netbox: ImportError: cannot import name '_HTML_TYPES' from 'debug_toolbar.middleware' Date: Sat, 13 Jul 2024 08:22:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: freebsd@wb9.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: kai@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280254 Bug ID: 280254 Summary: net-mgmt/netbox: ImportError: cannot import name '_HTML_TYPES' from 'debug_toolbar.middleware' Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: kai@FreeBSD.org Reporter: freebsd@wb9.se Assignee: kai@FreeBSD.org Flags: maintainer-feedback?(kai@FreeBSD.org) After upgrading netbox today I got this message when running the migration post-installation step: WARNINGS: ?: (debug_toolbar.W001) debug_toolbar.middleware.DebugToolbarMiddleware is missing from MIDDLEWARE. HINT: Add debug_toolbar.middleware.DebugToolbarMiddleware to MIDDLEWARE. I followed the instructions and updated MIDDLEWARE netbox/settings.py which made the warning disappear. When trying to restart netbox afterwards it cra= shed and I found the following message in the logs: gunicorn.netbox.error: [7635] Exception in worker process Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/gunicorn/arbiter.py", line = 609, in spawn_worker worker.init_process() File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/gthread.py= ", line 95, in init_process super().init_process() File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", = line 134, in init_process self.load_wsgi() File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", = line 146, in load_wsgi self.wsgi =3D self.app.wsgi() File "/usr/local/lib/python3.10/site-packages/gunicorn/app/base.py", line= 67, in wsgi self.callable =3D self.load() File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", l= ine 58, in load return self.load_wsgiapp() File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", l= ine 48, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python3.10/site-packages/gunicorn/util.py", line 371= , in import_app mod =3D importlib.import_module(module) File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlock= ed File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_remo= ved File "/usr/local/share/netbox/netbox/wsgi.py", line 7, in application =3D get_wsgi_application() File "/usr/local/lib/python3.10/site-packages/django/core/wsgi.py", line = 13, in get_wsgi_application return WSGIHandler()=20 File "/usr/local/lib/python3.10/site-packages/django/core/handlers/wsgi.p= y", line 118, in __init__ self.load_middleware() File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.p= y", line 40, in load_middleware middleware =3D import_string(middleware_path) File "/usr/local/lib/python3.10/site-packages/django/utils/module_loading.py", l= ine 30, in import_string return cached_import(module_path, class_name) File "/usr/local/lib/python3.10/site-packages/django/utils/module_loading.py", l= ine 15, in cached_import module =3D import_module(module_path) File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlock= ed File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_remo= ved File "/usr/local/lib/python3.10/site-packages/graphiql_debug_toolbar/middleware.= py", line 7, in from debug_toolbar.middleware import _HTML_TYPES#012ImportError: cannot import name '_HTML_TYPES' from 'debug_toolbar.middleware' (/usr/local/lib/python3.10/site-packages/debug_toolbar/middleware. Reading some code I found that the _HTML_TYPES is set in debug_toolbar.utils and not debug_toolbar.middleware. After monkey-patching /usr/local/lib/python3.10/site-packages/graphiql_debug_toolbar/middleware.p= y to import from debug_toolbar.utils instead netbox starts again. I'm guessing t= his is a dependency-version-incompatibility-thing? relevant installed packages: netbox-3.7.8_3 py310-django-debug-toolbar-4.4.6 py310-django-graphiql-debug-toolbar-0.2.0_3 --=20 You are receiving this mail because: You are the assignee for the bug.=