Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIP not importing most recent changes? #23

Open
varlenthegray opened this issue Jul 15, 2022 · 2 comments
Open

PIP not importing most recent changes? #23

varlenthegray opened this issue Jul 15, 2022 · 2 comments

Comments

@varlenthegray
Copy link

varlenthegray commented Jul 15, 2022

I'm running Django 4.0.6 and it appears that the code has been updated to the new force_str instead of force_text per GitHub, however PIP v 0.1.3 doesn't show these changes.

Running python3 manage.py check returns the following:

Traceback (most recent call last):
  File "/home/wcadev/.local/lib/python3.8/site-packages/simplemde/utils.py", line 5, in <module>
    from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/home/wcadev/.local/lib/python3.8/site-packages/django/utils/encoding.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/home/wcadev/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/home/wcadev/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 420, in execute
    django.setup()
  File "/home/wcadev/.local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/wcadev/.local/lib/python3.8/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "/home/wcadev/.local/lib/python3.8/site-packages/django/apps/config.py", line 304, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/wcadev/public_html/wcadmin/communication/models.py", line 4, in <module>
    from simplemde.fields import SimpleMDEField
  File "/home/wcadev/.local/lib/python3.8/site-packages/simplemde/fields.py", line 4, in <module>
    from .widgets import SimpleMDEEditor
  File "/home/wcadev/.local/lib/python3.8/site-packages/simplemde/widgets.py", line 13, in <module>
    from .utils import json_dumps
  File "/home/wcadev/.local/lib/python3.8/site-packages/simplemde/utils.py", line 7, in <module>
    from django.utils.encoding import force_unicode as force_text
ImportError: cannot import name 'force_unicode' from 'django.utils.encoding' (/home/wcadev/.local/lib/python3.8/site-packages/django/utils/encoding.py)
@varlenthegray
Copy link
Author

Additionally, forcing an update with a manual GitHub download resolved the errors.

@onepill
Copy link
Owner

onepill commented Jul 18, 2022

I have uploaded a new version to pypi which includes the latest compatibility changes for Django 4.0+. Please try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants