django-ledger icon indicating copy to clipboard operation
django-ledger copied to clipboard

migrate bug? gCompatibility issues about django 4.0.4

Open chenluyong opened this issue 3 years ago • 1 comments

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. pip install -r requirements.txt
Django>=3.0
ofxtools>=0.8.22
setuptools>=50.3.2
jsonschema>=3.2.0
Markdown~=3.3.4
Pillow>=8.4.0
graphene-django>=2.15.0
Faker>=8.16.0
behave>=1.2.6
  1. python manage.py migrate
Traceback (most recent call last):
  File "E:\git\code\github.com\django-ledger\manage.py", line 22, in <module>
    main()
  File "E:\git\code\github.com\django-ledger\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\core\management\__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\core\management\__init__.py", line 420, in execute
    django.setup()
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\apps\registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\apps\config.py", line 228, in create
    import_module(entry)
  File "E:\programming\python\Python310\lib\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 "E:\git\code\github.com\django-ledger\.env\lib\site-packages\graphene_django\__init__.py", line 1, in <module>
    from .fields import DjangoConnectionField, DjangoListField
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\graphene_django\fields.py", line 18, in <module>
    from .utils import maybe_queryset
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\graphene_django\utils\__init__.py", line 2, in <module>
    from .utils import (
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\graphene_django\utils\utils.py", line 6, in <module>
    from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\utils\encoding.py)

or

(.env) E:\git\code\github.com\django-ledger>python manage.py migrate
Traceback (most recent call last):
  File "E:\git\code\github.com\django-ledger\manage.py", line 22, in <module>
    main()
  File "E:\git\code\github.com\django-ledger\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\core\management\__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\core\management\__init__.py", line 420, in execute
    django.setup()
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\apps\registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "E:\git\code\github.com\django-ledger\.env\lib\site-packages\django\apps\config.py", line 228, in create
    import_module(entry)
  File "E:\programming\python\Python310\lib\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 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'graphql_auth'

Expected behavior Generate the corresponding db file sqlite.db

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: window 11
  • Version
Package         Version
--------------- -------
aniso8601       7.0.0
asgiref         3.5.1
attrs           21.4.0
behave          1.2.6
Django          4.0.4
Faker           13.7.0
graphene        2.1.9
graphene-django 2.15.0
graphql-core    2.3.2
graphql-relay   2.0.1
jsonschema      4.5.1
Markdown        3.3.7
ofxtools        0.9.5
parse           1.19.0
parse-type      0.6.0
Pillow          9.1.0
pip             21.3.1
promise         2.3
pyrsistent      0.18.1
python-dateutil 2.8.2
Rx              1.6.1
setuptools      60.5.0
singledispatch  3.7.0
six             1.16.0
sqlparse        0.4.2
text-unidecode  1.3
tzdata          2022.1
wheel           0.37.1

Additional context https://stackoverflow.com/questions/70382084/import-error-force-text-from-django-utils-encoding https://docs.djangoproject.com/en/4.0/ref/utils/#module-django.utils.encoding

chenluyong avatar May 09 '22 14:05 chenluyong

Hello, it seems that the requirements.txt file was out dated. v0.5.1.3 should correct this issue. Please retry and let me know.

elarroba avatar May 10 '22 14:05 elarroba

@chenluyong Has this been resolved?

elarroba avatar Oct 22 '22 00:10 elarroba