Django - ImportError: cannot import name 'Group' from 'channels'

 
Vista:
sin imagen de perfil
Val: 4
Ha mantenido su posición en Django (en relación al último mes)
Gráfica de Django

ImportError: cannot import name 'Group' from 'channels'

Publicado por Mauricio (2 intervenciones) el 20/03/2021 23:16:14
Estoy tratando de ejecutar un proyecto en ubuntu 16.04 con python 3.7, django 3.0 y varias bibliotecas, incluidas python_social_auth y canales. cuando ejecuto el proyecto, aparece el siguiente error.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Traceback (most recent call last):
  File "./manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/mauricio/Escritorio/entornos/red/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/mauricio/Escritorio/entornos/red/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/home/mauricio/Escritorio/entornos/red/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/mauricio/Escritorio/entornos/red/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/home/mauricio/Escritorio/entornos/red/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/mauricio/Escritorio/RedDebate/reddebate/debate/models.py", line 11, in <module>
    from channels import Group
ImportError: cannot import name 'Group' from 'channels' (/home/mauricio/Escritorio/entornos/red/lib/python3.7/site-packages/channels/__init__.py)
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 6
Ha disminuido 1 puesto en Django (en relación al último mes)
Gráfica de Django

ImportError: cannot import name 'Group' from 'channels'

Publicado por CARLOS (2 intervenciones) el 30/05/2021 06:10:46
Creo que te falla la importación.
from channels import Group cámbialo a from channels.models import Group si el Group lo tienes dentro del archivo models.py
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar