Channel tests with selenium in Django raise error message





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I'm following this tutorial to experiment Channels with Django. I'm working on Windows 10 HOME, Django 2.1.4 and Python 3.7.1



The goal of this tutorial is to build a chat app.



After downloading chromeDriver and adding it in the PATH, I run this command in my prompt :



py manage.py test chat.tests


Which returns this error message :



EETraceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

======================================================================
ERROR: test_when_chat_message_posted_then_not_seen_by_anyone_in_different_room (chat.tests.ChatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangotesttestcases.py", line 202, in __call__
self._pre_setup()
File "C:UserskevinEnvsmyprojectlibsite-packageschannelstestinglive.py", line 52, in _pre_setup
self._server_process.start()
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingprocess.py", line 112, in start
self._popen = self._Popen(self)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 322, in _Popen
return Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingpopen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingreduction.py", line 61, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DaphneProcess.__init__.<locals>.<lambda>'

======================================================================
ERROR: test_when_chat_message_posted_then_seen_by_everyone_in_same_room (chat.tests.ChatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangotesttestcases.py", line 202, in __call__
self._pre_setup()
File "C:UserskevinEnvsmyprojectlibsite-packageschannelstestinglive.py", line 52, in _pre_setup
self._server_process.start()
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingprocess.py", line 112, in start
self._popen = self._Popen(self)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 322, in _Popen
return Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingpopen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingreduction.py", line 61, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DaphneProcess.__init__.<locals>.<lambda>'

----------------------------------------------------------------------
Ran 0 tests in 4.689s

FAILED (errors=2)
Destroying test database for alias 'default'...


The same question (https://stackoverflow.com/questions/50016048....) provide a solution, but it doesn't work for me.



When I modify the file reduction.py to replace import pickle by import dill as pickle, I'm getting this new message error :



DevTools listening on ws://127.0.0.1:25037/devtools/browser/b4c722e4-c7f2-49fb-939b-7372e9688eea
C:UserskevinEnvsmyprojectlibsite-packagesdaphneserver.py:13: UserWarning: Something has already installed a non-asyncio Twisted reactor. Attempting to uninstall it; you can fix this warning by importing daphne.server early in your codebase or finding the package that imports Twisted and importing it later on.
UserWarning,
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
File "C:UserskevinEnvsmyprojectlibsite-packagesdill_dill.py", line 304, in load
obj = pik.load()
File "C:UserskevinEnvsmyprojectlibsite-packagesdill_dill.py", line 465, in find_class
return StockUnpickler.find_class(self, module, name)
File "C:UserskevinEnvsmyprojectlibsite-packageschannelsauth.py", line 12, in <module>
from django.contrib.auth.models import AnonymousUser
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangocontribauthmodels.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangocontribauthbase_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangodbmodelsbase.py", line 87, in __new__
app_config = apps.get_containing_app_config(module)
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangoappsregistry.py", line 249, in get_containing_app_config
self.check_apps_ready()
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangoappsregistry.py", line 132, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.


Please, someone could bring me help ?










share|improve this question























  • django.core.exceptions.AppRegistryNotReady suggests a miss configuration/lack of config. does the server run locally (not in test mode) with Daphne? Are you able to get this to work on a linux/posix system, the forking and rebuilding of python may be a little different.

    – Matthaus Woolard
    Jan 4 at 1:18











  • Thanks again @MatthausWoolard, my server is running locally with DEBUG = True in my settings.py file. My OS is Windows 10 . What could I get round this issue ?

    – FrancNovation
    Jan 4 at 10:59













  • do you still get this error when running in ubuntu?

    – Matthaus Woolard
    Jan 4 at 11:42











  • I'm going to try and I'll tell you

    – FrancNovation
    Jan 4 at 12:31











  • I had this exact same error, and I even opened up an issue on the GitHub page, but I was told to come here. Here is my post: stackoverflow.com/questions/54039839/…

    – Tyranno Taiwo
    Jan 5 at 14:26


















1















I'm following this tutorial to experiment Channels with Django. I'm working on Windows 10 HOME, Django 2.1.4 and Python 3.7.1



The goal of this tutorial is to build a chat app.



After downloading chromeDriver and adding it in the PATH, I run this command in my prompt :



py manage.py test chat.tests


Which returns this error message :



EETraceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

======================================================================
ERROR: test_when_chat_message_posted_then_not_seen_by_anyone_in_different_room (chat.tests.ChatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangotesttestcases.py", line 202, in __call__
self._pre_setup()
File "C:UserskevinEnvsmyprojectlibsite-packageschannelstestinglive.py", line 52, in _pre_setup
self._server_process.start()
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingprocess.py", line 112, in start
self._popen = self._Popen(self)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 322, in _Popen
return Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingpopen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingreduction.py", line 61, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DaphneProcess.__init__.<locals>.<lambda>'

======================================================================
ERROR: test_when_chat_message_posted_then_seen_by_everyone_in_same_room (chat.tests.ChatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangotesttestcases.py", line 202, in __call__
self._pre_setup()
File "C:UserskevinEnvsmyprojectlibsite-packageschannelstestinglive.py", line 52, in _pre_setup
self._server_process.start()
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingprocess.py", line 112, in start
self._popen = self._Popen(self)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 322, in _Popen
return Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingpopen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingreduction.py", line 61, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DaphneProcess.__init__.<locals>.<lambda>'

----------------------------------------------------------------------
Ran 0 tests in 4.689s

FAILED (errors=2)
Destroying test database for alias 'default'...


The same question (https://stackoverflow.com/questions/50016048....) provide a solution, but it doesn't work for me.



When I modify the file reduction.py to replace import pickle by import dill as pickle, I'm getting this new message error :



DevTools listening on ws://127.0.0.1:25037/devtools/browser/b4c722e4-c7f2-49fb-939b-7372e9688eea
C:UserskevinEnvsmyprojectlibsite-packagesdaphneserver.py:13: UserWarning: Something has already installed a non-asyncio Twisted reactor. Attempting to uninstall it; you can fix this warning by importing daphne.server early in your codebase or finding the package that imports Twisted and importing it later on.
UserWarning,
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
File "C:UserskevinEnvsmyprojectlibsite-packagesdill_dill.py", line 304, in load
obj = pik.load()
File "C:UserskevinEnvsmyprojectlibsite-packagesdill_dill.py", line 465, in find_class
return StockUnpickler.find_class(self, module, name)
File "C:UserskevinEnvsmyprojectlibsite-packageschannelsauth.py", line 12, in <module>
from django.contrib.auth.models import AnonymousUser
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangocontribauthmodels.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangocontribauthbase_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangodbmodelsbase.py", line 87, in __new__
app_config = apps.get_containing_app_config(module)
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangoappsregistry.py", line 249, in get_containing_app_config
self.check_apps_ready()
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangoappsregistry.py", line 132, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.


Please, someone could bring me help ?










share|improve this question























  • django.core.exceptions.AppRegistryNotReady suggests a miss configuration/lack of config. does the server run locally (not in test mode) with Daphne? Are you able to get this to work on a linux/posix system, the forking and rebuilding of python may be a little different.

    – Matthaus Woolard
    Jan 4 at 1:18











  • Thanks again @MatthausWoolard, my server is running locally with DEBUG = True in my settings.py file. My OS is Windows 10 . What could I get round this issue ?

    – FrancNovation
    Jan 4 at 10:59













  • do you still get this error when running in ubuntu?

    – Matthaus Woolard
    Jan 4 at 11:42











  • I'm going to try and I'll tell you

    – FrancNovation
    Jan 4 at 12:31











  • I had this exact same error, and I even opened up an issue on the GitHub page, but I was told to come here. Here is my post: stackoverflow.com/questions/54039839/…

    – Tyranno Taiwo
    Jan 5 at 14:26














1












1








1


1






I'm following this tutorial to experiment Channels with Django. I'm working on Windows 10 HOME, Django 2.1.4 and Python 3.7.1



The goal of this tutorial is to build a chat app.



After downloading chromeDriver and adding it in the PATH, I run this command in my prompt :



py manage.py test chat.tests


Which returns this error message :



EETraceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

======================================================================
ERROR: test_when_chat_message_posted_then_not_seen_by_anyone_in_different_room (chat.tests.ChatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangotesttestcases.py", line 202, in __call__
self._pre_setup()
File "C:UserskevinEnvsmyprojectlibsite-packageschannelstestinglive.py", line 52, in _pre_setup
self._server_process.start()
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingprocess.py", line 112, in start
self._popen = self._Popen(self)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 322, in _Popen
return Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingpopen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingreduction.py", line 61, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DaphneProcess.__init__.<locals>.<lambda>'

======================================================================
ERROR: test_when_chat_message_posted_then_seen_by_everyone_in_same_room (chat.tests.ChatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangotesttestcases.py", line 202, in __call__
self._pre_setup()
File "C:UserskevinEnvsmyprojectlibsite-packageschannelstestinglive.py", line 52, in _pre_setup
self._server_process.start()
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingprocess.py", line 112, in start
self._popen = self._Popen(self)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 322, in _Popen
return Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingpopen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingreduction.py", line 61, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DaphneProcess.__init__.<locals>.<lambda>'

----------------------------------------------------------------------
Ran 0 tests in 4.689s

FAILED (errors=2)
Destroying test database for alias 'default'...


The same question (https://stackoverflow.com/questions/50016048....) provide a solution, but it doesn't work for me.



When I modify the file reduction.py to replace import pickle by import dill as pickle, I'm getting this new message error :



DevTools listening on ws://127.0.0.1:25037/devtools/browser/b4c722e4-c7f2-49fb-939b-7372e9688eea
C:UserskevinEnvsmyprojectlibsite-packagesdaphneserver.py:13: UserWarning: Something has already installed a non-asyncio Twisted reactor. Attempting to uninstall it; you can fix this warning by importing daphne.server early in your codebase or finding the package that imports Twisted and importing it later on.
UserWarning,
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
File "C:UserskevinEnvsmyprojectlibsite-packagesdill_dill.py", line 304, in load
obj = pik.load()
File "C:UserskevinEnvsmyprojectlibsite-packagesdill_dill.py", line 465, in find_class
return StockUnpickler.find_class(self, module, name)
File "C:UserskevinEnvsmyprojectlibsite-packageschannelsauth.py", line 12, in <module>
from django.contrib.auth.models import AnonymousUser
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangocontribauthmodels.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangocontribauthbase_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangodbmodelsbase.py", line 87, in __new__
app_config = apps.get_containing_app_config(module)
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangoappsregistry.py", line 249, in get_containing_app_config
self.check_apps_ready()
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangoappsregistry.py", line 132, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.


Please, someone could bring me help ?










share|improve this question














I'm following this tutorial to experiment Channels with Django. I'm working on Windows 10 HOME, Django 2.1.4 and Python 3.7.1



The goal of this tutorial is to build a chat app.



After downloading chromeDriver and adding it in the PATH, I run this command in my prompt :



py manage.py test chat.tests


Which returns this error message :



EETraceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

======================================================================
ERROR: test_when_chat_message_posted_then_not_seen_by_anyone_in_different_room (chat.tests.ChatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangotesttestcases.py", line 202, in __call__
self._pre_setup()
File "C:UserskevinEnvsmyprojectlibsite-packageschannelstestinglive.py", line 52, in _pre_setup
self._server_process.start()
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingprocess.py", line 112, in start
self._popen = self._Popen(self)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 322, in _Popen
return Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingpopen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingreduction.py", line 61, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DaphneProcess.__init__.<locals>.<lambda>'

======================================================================
ERROR: test_when_chat_message_posted_then_seen_by_everyone_in_same_room (chat.tests.ChatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangotesttestcases.py", line 202, in __call__
self._pre_setup()
File "C:UserskevinEnvsmyprojectlibsite-packageschannelstestinglive.py", line 52, in _pre_setup
self._server_process.start()
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingprocess.py", line 112, in start
self._popen = self._Popen(self)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingcontext.py", line 322, in _Popen
return Popen(process_obj)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingpopen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingreduction.py", line 61, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'DaphneProcess.__init__.<locals>.<lambda>'

----------------------------------------------------------------------
Ran 0 tests in 4.689s

FAILED (errors=2)
Destroying test database for alias 'default'...


The same question (https://stackoverflow.com/questions/50016048....) provide a solution, but it doesn't work for me.



When I modify the file reduction.py to replace import pickle by import dill as pickle, I'm getting this new message error :



DevTools listening on ws://127.0.0.1:25037/devtools/browser/b4c722e4-c7f2-49fb-939b-7372e9688eea
C:UserskevinEnvsmyprojectlibsite-packagesdaphneserver.py:13: UserWarning: Something has already installed a non-asyncio Twisted reactor. Attempting to uninstall it; you can fix this warning by importing daphne.server early in your codebase or finding the package that imports Twisted and importing it later on.
UserWarning,
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:userskevinappdatalocalprogramspythonpython37-32Libmultiprocessingspawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
File "C:UserskevinEnvsmyprojectlibsite-packagesdill_dill.py", line 304, in load
obj = pik.load()
File "C:UserskevinEnvsmyprojectlibsite-packagesdill_dill.py", line 465, in find_class
return StockUnpickler.find_class(self, module, name)
File "C:UserskevinEnvsmyprojectlibsite-packageschannelsauth.py", line 12, in <module>
from django.contrib.auth.models import AnonymousUser
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangocontribauthmodels.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangocontribauthbase_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangodbmodelsbase.py", line 87, in __new__
app_config = apps.get_containing_app_config(module)
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangoappsregistry.py", line 249, in get_containing_app_config
self.check_apps_ready()
File "C:UserskevinEnvsmyprojectlibsite-packagesdjangoappsregistry.py", line 132, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.


Please, someone could bring me help ?







python django websocket selenium-chromedriver django-channels






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 3 at 16:14









FrancNovationFrancNovation

82112




82112













  • django.core.exceptions.AppRegistryNotReady suggests a miss configuration/lack of config. does the server run locally (not in test mode) with Daphne? Are you able to get this to work on a linux/posix system, the forking and rebuilding of python may be a little different.

    – Matthaus Woolard
    Jan 4 at 1:18











  • Thanks again @MatthausWoolard, my server is running locally with DEBUG = True in my settings.py file. My OS is Windows 10 . What could I get round this issue ?

    – FrancNovation
    Jan 4 at 10:59













  • do you still get this error when running in ubuntu?

    – Matthaus Woolard
    Jan 4 at 11:42











  • I'm going to try and I'll tell you

    – FrancNovation
    Jan 4 at 12:31











  • I had this exact same error, and I even opened up an issue on the GitHub page, but I was told to come here. Here is my post: stackoverflow.com/questions/54039839/…

    – Tyranno Taiwo
    Jan 5 at 14:26



















  • django.core.exceptions.AppRegistryNotReady suggests a miss configuration/lack of config. does the server run locally (not in test mode) with Daphne? Are you able to get this to work on a linux/posix system, the forking and rebuilding of python may be a little different.

    – Matthaus Woolard
    Jan 4 at 1:18











  • Thanks again @MatthausWoolard, my server is running locally with DEBUG = True in my settings.py file. My OS is Windows 10 . What could I get round this issue ?

    – FrancNovation
    Jan 4 at 10:59













  • do you still get this error when running in ubuntu?

    – Matthaus Woolard
    Jan 4 at 11:42











  • I'm going to try and I'll tell you

    – FrancNovation
    Jan 4 at 12:31











  • I had this exact same error, and I even opened up an issue on the GitHub page, but I was told to come here. Here is my post: stackoverflow.com/questions/54039839/…

    – Tyranno Taiwo
    Jan 5 at 14:26

















django.core.exceptions.AppRegistryNotReady suggests a miss configuration/lack of config. does the server run locally (not in test mode) with Daphne? Are you able to get this to work on a linux/posix system, the forking and rebuilding of python may be a little different.

– Matthaus Woolard
Jan 4 at 1:18





django.core.exceptions.AppRegistryNotReady suggests a miss configuration/lack of config. does the server run locally (not in test mode) with Daphne? Are you able to get this to work on a linux/posix system, the forking and rebuilding of python may be a little different.

– Matthaus Woolard
Jan 4 at 1:18













Thanks again @MatthausWoolard, my server is running locally with DEBUG = True in my settings.py file. My OS is Windows 10 . What could I get round this issue ?

– FrancNovation
Jan 4 at 10:59







Thanks again @MatthausWoolard, my server is running locally with DEBUG = True in my settings.py file. My OS is Windows 10 . What could I get round this issue ?

– FrancNovation
Jan 4 at 10:59















do you still get this error when running in ubuntu?

– Matthaus Woolard
Jan 4 at 11:42





do you still get this error when running in ubuntu?

– Matthaus Woolard
Jan 4 at 11:42













I'm going to try and I'll tell you

– FrancNovation
Jan 4 at 12:31





I'm going to try and I'll tell you

– FrancNovation
Jan 4 at 12:31













I had this exact same error, and I even opened up an issue on the GitHub page, but I was told to come here. Here is my post: stackoverflow.com/questions/54039839/…

– Tyranno Taiwo
Jan 5 at 14:26





I had this exact same error, and I even opened up an issue on the GitHub page, but I was told to come here. Here is my post: stackoverflow.com/questions/54039839/…

– Tyranno Taiwo
Jan 5 at 14:26












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54026013%2fchannel-tests-with-selenium-in-django-raise-error-message%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54026013%2fchannel-tests-with-selenium-in-django-raise-error-message%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

Npm cannot find a required file even through it is in the searched directory