Open ghost opened 7 years ago
ok a bit confused now
try: from django.utils.module_loading import import_string except ImportError: from django.utils.module_loading import import_by_path as import_string
And then tried this in shell
In [1]: from django.utils.module_loading import import_string
works.
pip installed django-omnibus==0.2.0
and has this at line 4
from django.utils.module_loading import import_by_path
So, looks like problem fixed in source but that hasn't been deployed upstream. Should I just pull from here, instead of getting pip version?
$ ./manage.py omnibusd Traceback (most recent call last): File "./manage.py", line 22, in
execute_from_command_line(sys.argv)
File "/Users/gbc/virtualenvs/todo_be/lib/python3.6/site-packages/django/core/management/init.py", line 363, in execute_from_command_line
utility.execute()
File "/Users/gbc/virtualenvs/todo_be/lib/python3.6/site-packages/django/core/management/init.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/gbc/virtualenvs/todo_be/lib/python3.6/site-packages/django/core/management/init.py", line 205, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/Users/gbc/virtualenvs/todo_be/lib/python3.6/site-packages/django/core/management/init.py", line 40, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/Users/gbc/virtualenvs/todo_be/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 950, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 678, in exec_module
File "", line 205, in _call_with_frames_removed
File "/Users/gbc/virtualenvs/todo_be/lib/python3.6/site-packages/omnibus/management/commands/omnibusd.py", line 4, in
from django.utils.module_loading import import_by_path
ImportError: cannot import name 'import_by_path'
Changed 3 years ago by Tim Graham timograham@… In d029fafea1a1f2f257397fbcd0fa3b531e09854f: Removed utils.module_loading.import_by_path() per deprecation timeline; refs #21674.
Was giving django-omnibus a go, and hit this import error. What are the version requirements for this product? Will Django 11.1 be supported?