Open
Conversation
|
this would be great to have, as I cannot use the library without seeing this error: Traceback (most recent call last):
File "/app/./manage.py", line 28, in <module>
main()
File "/app/./manage.py", line 24, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 420, in execute
django.setup()
File "/usr/local/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.10/site-packages/django/apps/registry.py", line 116, in populate
app_config.import_models()
File "/usr/local/lib/python3.10/site-packages/django/apps/config.py", line 304, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/app/accounts/models.py", line 9, in <module>
from smartfields import fields
File "/usr/local/lib/python3.10/site-packages/smartfields/fields/__init__.py", line 12, in <module>
from smartfields.managers import FieldManager
File "/usr/local/lib/python3.10/site-packages/smartfields/managers.py", line 5, in <module>
from smartfields.utils import ProcessingError, VALUE_NOT_SET, get_model_name
File "/usr/local/lib/python3.10/site-packages/smartfields/utils.py", line 6, in <module>
from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/usr/local/lib/python3.10/site-packages/django/utils/encoding.py)
make: *** [migrate] Error 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR should add compatibility for django 4+, after which force_text() was deprecated in favor of force_str(), and url() was deprecated. The re_path() function is a drop-in replacement for url().
There is not currently any test coverage, so I'd appreciate it if anyone has older versions of django they can test with. I'm currently doing my own testing with a recently updated application.