Updating rasa is an really complex thing as internal coded files are all inter linked and with an update many packages get deprecated so replacing them can cause disturbance to other code how to handle this thing. for example I was using rasa 3.5.5 but i caught with some conflicts so when i dig i found its because of older version so i updated rasa version then got error for deprecated module:- import pkg_resources declare_namespace(pkg)
solution:-
import pkg_resources
replacement:- “import importlib.resources as resources”
declare_namespace(pkg)
correction:- removed
for pkg in self._get_metadata(‘namespace_packages.txt’):
if pkg in sys.modules:
declare_namespace(pkg)
(as the modern approach for handling namespace packages doesn’t require explicit declaration using declare_namespace()
.)
then i got this error:- schema_file = resources.resource_filename(package_name, schema_path) AttributeError: module ‘importlib.resources’ has no attribute ‘resource_filename’
solution:- schema_file = resources.files(package_name) / schema_path
(I replaced resource_filename with resources.files and change format as files take only one positional argument so i used /
operator to concatenate the package name and the file path)
now I got this error :-
site-packages\pykwalify\core.py", line
173, in _load_extensions
self.loaded_extensions.append(SourceFileLoader(“”, f).load_module())
File “”, line 548, in _check_name_wrapper
File “”, line 1063, in load_module
File “”, line 888, in load_module
File “”, line 284, in _load_module_shim
File “”, line 429, in spec_from_loader
File “”, line 776, in spec_from_file_location
File “”, line 869, in is_package
File “”, line 134, in _path_split
File “”, line 134, in
AttributeError: ‘WindowsPath’ object has no attribute ‘rfind’
This error i am unable to resolve please help with it. And also tell as its very difficult to update rasa , so is it fine using older version? (after upgrading i got so many conflicts so i again downgraded still the same error persists)
updated rasa config :- Rasa Version : 3.6.6 Minimum Compatible Version: 3.5.0 Rasa SDK Version : 3.6.2 Python Version : 3.10.0 Operating System : Windows
Older rasa config:- Rasa Version : 3.5.5 Minimum Compatible Version: 3.5.0 Rasa SDK Version : 3.5.1 Python Version : 3.8.10 Operating System : Windows-10-10.0.19