Hello. I got thrown into the fire with an application that haven’t been updated in a while. I’ve been tasked to update it. I honestly tried following the docs with upgrading these major versions and it seems like I’ve done something wrong. Here’s the error message that I’m receiving:
Error Message:
Traceback (most recent call last):
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/template/backends/django.py”, line 128, in get_package_libraries
module = import_module(entry[1])
File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 850, in exec_module
File “”, line 228, in _call_with_frames_removed
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django_extensions/templatetags/widont.py”, line 6, in
from django.utils.encoding import force_text
ImportError: cannot import name ‘force_text’ from ‘django.utils.encoding’ (/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/utils/encoding.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/Users/joshuacovington/Desktop/Git/Beekeeper/manage.py”, line 21, in
main()
File “/Users/joshuacovington/Desktop/Git/Beekeeper/manage.py”, line 17, in main
execute_from_command_line(sys.argv)
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/management/init.py”, line 442, in execute_from_command_line
utility.execute()
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/management/init.py”, line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/management/base.py”, line 412, in run_from_argv
self.execute(*args, **cmd_options)
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/management/base.py”, line 458, in execute
output = self.handle(*args, **options)
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/management/base.py”, line 106, in wrapper
res = handle_func(*args, **kwargs)
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/management/commands/migrate.py”, line 100, in handle
self.check(databases=[database])
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/management/base.py”, line 485, in check
all_issues = checks.run_checks(
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/checks/registry.py”, line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/core/checks/templates.py”, line 60, in check_for_template_tags_with_the_same_name
for module_name, module_path in get_template_tag_modules():
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/template/backends/django.py”, line 105, in get_template_tag_modules
for name in get_package_libraries(pkg):
File “/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/template/backends/django.py”, line 130, in get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load ‘django_extensions.templatetags.widont’: cannot import name ‘force_text’ from ‘django.utils.encoding’ (/Users/joshuacovington/Desktop/Git/Beekeeper/env/lib/python3.9/site-packages/django/utils/encoding.py)
Could I please get some help with this. In other files I went in and changed the import. For some reason I can’t find this import even when I navigate to this file. Is there a script or something I can run to ensure I upgrade my dependencies that match with this current version.