Re: raise AppRegistryNotReady("Models aren't loaded yet.") .......AppRegistryNotReady: Models aren't loaded yet.

2015-01-12 Thread Collin Anderson
cache() > File "C:\venv\lib\site-packages\django\db\models\options.py", line 577, > in _fill_related_many_to_many_cache > for klass in self.apps.get_models(): > File "C:\venv\lib\site-packages\django\utils\lru_cache.py", line 101, in > wrapper >

raise AppRegistryNotReady("Models aren't loaded yet.") .......AppRegistryNotReady: Models aren't loaded yet.

2015-01-09 Thread Ibrahim K
he for klass in self.apps.get_models(): File "C:\venv\lib\site-packages\django\utils\lru_cache.py", line 101, in wrapper result = user_function(*args, **kwds) File "C:\venv\lib\site-packages\django\apps\registry.py", line 168, in get_models self.check_models

Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-25 Thread Sabine Maennel
Thanks Rusell, that helps. On Thu, Sep 25, 2014 at 1:52 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > Hi Sabine, > > No - you don't put it in your settings file; the settings file is loaded > as part of the setup call. > > As a completely manual process, you can just run the followi

Re: I have several models throwing this error: "AppRegistryNotReady: Models aren't loaded yet."

2014-09-24 Thread Sabine Maennel
Thank you so much for these very helpful links to the documentation, Russell! Am Donnerstag, 25. September 2014 01:48:52 UTC+2 schrieb Russell Keith-Magee: > > Hi Sabine, > > Yes, this error is related to 1.7; no, it's not related to migrations. > It's related to the App Loading refactor: > > h

Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Russell Keith-Magee
Hi Sabine, No - you don't put it in your settings file; the settings file is loaded as part of the setup call. As a completely manual process, you can just run the following: import django django.setup() as the first two commands in your Python shell. If PyCharm has any hooks you can tie into f

Re: I have several models throwing this error: "AppRegistryNotReady: Models aren't loaded yet."

2014-09-24 Thread Russell Keith-Magee
Hi Sabine, Yes, this error is related to 1.7; no, it's not related to migrations. It's related to the App Loading refactor: https://docs.djangoproject.com/en/1.7/releases/1.7/#app-loading-refactor The error is caused because you're interacting with Django models before all the models are known t

Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Sabine Maennel
I am using Pycharm and I did declare my project as a Django project. So how can call django.setup()? Do I do that in my settings-file? On Wed, Sep 24, 2014 at 4:38 PM, Collin Anderson wrote: > Are you using a plain python shell or ./manage.py shell? If you are using > a plain python shell, you

Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Collin Anderson
Are you using a plain python shell or ./manage.py shell? If you are using a plain python shell, you must call django.setup() first. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it

Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Sabine Maennel
Thank you Tom, that was very helpful. It all works if I throw these unicode representations out. I do have 'django.contrib.auth' installed. I can play around with what representations to use now. But from the error message I would not have guessed that it had this reason. So again thanks very

Re: AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Tom Evans
On Wed, Sep 24, 2014 at 1:12 PM, Sabine Maennel wrote: > Hello, please help! > > Some of my models throw this error, when I query them with object.all(). > They coexist in apps that have other models that are just fine. I do not > understand at all what the problem might be and could not google it

AppRegistryNotReady: Models aren't loaded yet.

2014-09-24 Thread Sabine Maennel
File "/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/apps/registry.py", line 168, in get_models self.check_models_ready() File "/Users/sabinemaennel/VirtualEnvs/netteachers/lib/python2.7/site-packages/django/apps/registry.py", line 131, i

I have several models throwing this error: "AppRegistryNotReady: Models aren't loaded yet."

2014-09-24 Thread Sabine Maennel
Mostly it is models in the same app: one is fine and the other one throws this error, when I call them from my shell: I start my shell and run x=.objects.all() which runs fine, but then when I want to show x by: print x the error occurs. I really do not know what it means, googling it d