Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Jul 2022 05:22:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 265041] www/flexget won't run correctly due to missing safe_str_cmp function
Message-ID:  <bug-265041-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265041

            Bug ID: 265041
           Summary: www/flexget won't run correctly due to missing
                    safe_str_cmp function
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: jbeich@FreeBSD.org
          Reporter: edgeman@gmail.com
          Assignee: jbeich@FreeBSD.org
             Flags: maintainer-feedback?(jbeich@FreeBSD.org)

Since I followed the instructions in UPDATING re: python 3.9, I've been get=
ting
this error:
ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security'
(/usr/local/lib/python3.9/site-packages/werkzeug/security.py)
in my output of flexget.
I did some Googling, it looks like werkzeug removed the "safe_str_cmp" func=
tion
in 2.1.0:
https://stackoverflow.com/questions/71652965/importerror-cannot-import-name=
-safe-str-cmp-from-werkzeug-security
https://werkzeug.palletsprojects.com/en/2.1.x/changes/#version-2-1-0
"Remove the pbkdf2_hex, pbkdf2_bin, and safe_str_cmp functions. Use equival=
ents
in hashlib and hmac modules instead."

I have done a full remove and install of flexget to check...

=3D=3D=3D>>> The following actions were performed:
        Installation of www/py-werkzeug@py39 (py39-werkzeug-2.1.2)
        Installation of www/py-flask@py39 (py39-Flask-2.1.2)
        Installation of www/py-flask-compress@py39 (py39-Flask-Compress-1.1=
0.1)
        Installation of www/py-flask-cors@py39 (py39-Flask-Cors-3.0.8)
        Installation of www/py-flask-login@py39 (py39-Flask-Login-0.5.0)
        Installation of www/py-flask-restful@py39 (py39-Flask-RESTful-0.3.9)
        Installation of www/py-flask-restx@py39 (py39-flask-restx-0.5.1)
        Installation of www/flexget (flexget-3.3.19)



Looking at the full traceback, this might be an issue with flask_login, in
which case feel free to move the bug report to that package...:


2022-07-05 01:20:59 CRITICAL plugin                        Plugin
`flexget.components.tvmaze.api` failed to import dependencies
Traceback (most recent call last):

  File "/usr/local/bin/flexget", line 33, in <module>
    sys.exit(load_entry_point('FlexGet=3D=3D3.3.19', 'console_scripts',
'flexget')())
    =E2=94=82   =E2=94=82    =E2=94=94 <function importlib_load_entry_point=
 at 0x800b880d0>
    =E2=94=82   =E2=94=94 <built-in function exit>
    =E2=94=94 <module 'sys' (built-in)>
  File "/usr/local/lib/python3.9/site-packages/flexget/__init__.py", line 4=
4,
in main
    manager.start()
    =E2=94=82       =E2=94=94 <function Manager.start at 0x8047254c0>
    =E2=94=94 <flexget.manager.Manager object at 0x8047067f0>
  File "/usr/local/lib/python3.9/site-packages/flexget/manager.py", line 38=
2,
in start
    self.initialize()
    =E2=94=82    =E2=94=94 <function Manager.initialize at 0x804725280>
    =E2=94=94 <flexget.manager.Manager object at 0x8047067f0>
  File "/usr/local/lib/python3.9/site-packages/flexget/manager.py", line 22=
4,
in initialize
    plugin.load_plugins(
    =E2=94=82      =E2=94=94 <function load_plugins at 0x803fa59d0>
    =E2=94=94 <module 'flexget.plugin' from
'/usr/local/lib/python3.9/site-packages/flexget/plugin.py'>
  File "/usr/local/lib/python3.9/site-packages/flexget/plugin.py", line 551=
, in
load_plugins
    _load_components_from_dirs(extra_components)
    =E2=94=82                          =E2=94=94 ['/home/edgeman/.flexget/c=
omponents',
'/usr/local/lib/python3.9/site-packages/flexget/components']
    =E2=94=94 <function _load_components_from_dirs at 0x803fa5790>
  File "/usr/local/lib/python3.9/site-packages/flexget/plugin.py", line 490=
, in
_load_components_from_dirs
    _import_plugin(package_name, component_path)
    =E2=94=82              =E2=94=82             =E2=94=94
PosixPath('/usr/local/lib/python3.9/site-packages/flexget/components/tvmaze=
/api.py')
    =E2=94=82              =E2=94=94 'flexget.components.tvmaze.api'
    =E2=94=94 <function _import_plugin at 0x8040dd700>
> File "/usr/local/lib/python3.9/site-packages/flexget/plugin.py", line 419=
, in _import_plugin
    import_module(module_name)
    =E2=94=82             =E2=94=94 'flexget.components.tvmaze.api'
    =E2=94=94 <function import_module at 0x80146aa60>
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in
import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           =E2=94=82          =E2=94=82           =E2=94=82    =E2=94=82   =
     =E2=94=82        =E2=94=94 0
           =E2=94=82          =E2=94=82           =E2=94=82    =E2=94=82   =
     =E2=94=94 None
           =E2=94=82          =E2=94=82           =E2=94=82    =E2=94=94 0
           =E2=94=82          =E2=94=82           =E2=94=94 'flexget.compon=
ents.tvmaze.api'
           =E2=94=82          =E2=94=94 <function _gcd_import at 0x800b4631=
0>
           =E2=94=94 <module 'importlib._bootstrap' (frozen)>
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_remo=
ved
  File
"/usr/local/lib/python3.9/site-packages/flexget/components/tvmaze/api.py", =
line
4, in <module>
    from flexget.api import APIResource, api
  File "/usr/local/lib/python3.9/site-packages/flexget/api/__init__.py", li=
ne
1, in <module>
    from .app import APIClient, APIResource, api, api_app  # noqa
  File "/usr/local/lib/python3.9/site-packages/flexget/api/app.py", line 24=
, in
<module>
    from flexget.webserver import User
  File "/usr/local/lib/python3.9/site-packages/flexget/webserver.py", line =
10,
in <module>
    from flask_login import UserMixin
  File "/usr/local/lib/python3.9/site-packages/flask_login/__init__.py", li=
ne
16, in <module>
    from .login_manager import LoginManager
  File "/usr/local/lib/python3.9/site-packages/flask_login/login_manager.py=
",
line 24, in <module>
    from .utils import (login_url as make_login_url, _create_identifier,
  File "/usr/local/lib/python3.9/site-packages/flask_login/utils.py", line =
13,
in <module>
    from werkzeug.security import safe_str_cmp

ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security'
(/usr/local/lib/python3.9/site-packages/werkzeug/security.py)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265041-7788>