Package: python3-flasgger
Version: 0.9.7.2~dev2+dfsg-3
Severity: grave

Traceback (most recent call last):
  File "/home/work/loca/evaalapi/./demo", line 15, in <module>
    from evaalapi import statefmt, estfmt
  File "/home/work/loca/evaalapi/evaalapi.py", line 162, in <module>
    Swagger(app, config=swagger_config, template=swagger_template, 
sanitizer=MK_SANITIZER)
  File "/usr/lib/python3/dist-packages/flasgger/base.py", line 255, in __init__
    self.init_app(app)
  File "/usr/lib/python3/dist-packages/flasgger/base.py", line 269, in init_app
    self.register_views(app)
  File "/usr/lib/python3/dist-packages/flasgger/base.py", line 645, in 
register_views
    if uiversion < 3:
       ^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'str' and 'int'

I forced the comparison to return False and everything works:

--- base.py     2024-07-16 13:53:41.068427862 +0200
+++ base.py~    2023-05-10 19:09:33.000000000 +0200
@@ -642,7 +642,7 @@
                 ))
             )

-            if False: #uiversion < 3:
+            if uiversion < 3:
                 redirect_default = specs_route + '/o2c.html'
             else:
                 redirect_default = "/oauth2-redirect.html"

-- 
Francesco Potortì (ricercatore)        ISTI - CNR, Pisa, Italy                 
Web:    http://fly.isti.cnr.it         Skype:  wnlabisti
Mobile: +39.348.8283.107               also Telegram, and even Wa


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (101, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.9.8-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-flasgger depends on:
ii  libjs-jquery        3.6.1+dfsg+~3.5.14-1
ii  python3             3.12.3-1
ii  python3-certifi     2024.6.2-1
ii  python3-flask       3.0.3-1
ii  python3-jsonschema  4.19.2-3
ii  python3-mistune     3.0.2-1
ii  python3-packaging   24.0-1
ii  python3-yaml        6.0.1-2+b1

python3-flasgger recommends no packages.

python3-flasgger suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/lib/python3/dist-packages/flasgger/base.py (from 
python3-flasgger package)

Reply via email to