Re: [Django] #31374: Runtime Error unable to solve from forums/ FAQ.

2020-05-23 Thread Django
#31374: Runtime Error unable to solve from forums/ FAQ.
-+-
 Reporter:  l_sharma |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Uncategorized|  Version:  3.0
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  django-pyodbc-azure  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Andrew Badr):

 Commenting in case this helps anyone else. I hit this same error trying to
 upgrade a simple Django 1.9.13 project from python 2.7 to python 3.8.

 `RuntimeError: __class__ not set defining 'AbstractBaseUser' as . Was __classcell__
 propagated to type.__new__?`

 Not using `django-pyodbc-azure` or anything else unusual. This error seems
 be coming from within Django itself.(File
 "/app/.heroku/python/lib/python3.8/site-
 packages/django/contrib/auth/base_user.py", line 49). What's strange is
 that the error doesn't happen for my locally, only on Heroku.

 Upgrading to Django 1.11 fixed the issue.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.8c50fd502e2484d33ac5c528dad3%40djangoproject.com.


Re: [Django] #31374: Runtime Error unable to solve from forums/ FAQ. (was: Runtime Error unable to solve from forums/ FAQ)

2020-03-17 Thread Django
#31374: Runtime Error unable to solve from forums/ FAQ.
-+-
 Reporter:  l_sharma |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Uncategorized|  Version:  3.0
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  django-pyodbc-azure  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * status:  new => closed
 * resolution:   => invalid


Old description:

> I am trying to make connection with MS SQL with following settings
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'sql_server.pyodbc',
> 'NAME': 'dbName',
> 'USER': 'userName',
> 'PASSWORD': 'password',
> 'HOST':'hostName',
> 'PORT': 1433,
> 'OPTIONS': {
> 'driver': "SQL Server"
> }
> }
> }
>
> I had to downgrade to : pip install 'django-pyodbc-azure<1.11' which was
> otherwise giving me a error of No Server/DSN found. However after
> downgrading when I execute "python manage.py makemigrations" or python
> manage.py runserver.
>
> Following is my error, which I am unable to understand. Any help would be
> of great help.
> Thanks in advance.
> "
> (venv) C:\Users\L_Sharma\PycharmProjects\Test1>python manage.py
> makemigrations
> Traceback (most recent call last):
>   File "manage.py", line 21, in 
> main()
>   File "manage.py", line 17, in main
> execute_from_command_line(sys.argv)
>   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
> packages\django\core\management\__init__.py", line 367, in
> execute_from_command_line
> utility.execute()
>   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
> packages\django\core\management\__init__.py", line 341, in execute
> django.setup()
>   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
> packages\django\__init__.py", line 27, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
> packages\django\apps\registry.py", line 108, in populate
> app_config.import_models(all_models)
>   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
> packages\django\apps\config.py", line 199, in import_models
> self.models_module = import_module(models_module_name)
>   File
> "C:\Users\L_Sharma\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py",
> line 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1014, in _gcd_import
>   File "", line 991, in _find_and_load
>   File "", line 975, in
> _find_and_load_unlocked
>   File "", line 671, in _load_unlocked
>   File "", line 783, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
> packages\django\contrib\auth\models.py", line 4, in 
> from django.contrib.auth.base_user import AbstractBaseUser,
> BaseUserManager
>   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
> packages\django\contrib\auth\base_user.py", line 52, in 
> class AbstractBaseUser(models.Model):
> RuntimeError: __class__ not set defining 'AbstractBaseUser' as  'django.contrib.auth.base_user.AbstractBaseUser'>. Was __classcell__
> propagated to type.__new__?
>
> "

New description:

 I am trying to make connection with MS SQL with following settings
 {{{
 DATABASES = {
 'default': {
 'ENGINE': 'sql_server.pyodbc',
 'NAME': 'dbName',
 'USER': 'userName',
 'PASSWORD': 'password',
 'HOST':'hostName',
 'PORT': 1433,
 'OPTIONS': {
 'driver': "SQL Server"
 }
 }
 }
 }}}
 I had to downgrade to : pip install 'django-pyodbc-azure<1.11' which was
 otherwise giving me a error of No Server/DSN found. However after
 downgrading when I execute "python manage.py makemigrations" or python
 manage.py runserver.

 Following is my error, which I am unable to understand. Any help would be
 of great help.
 Thanks in advance.


 {{{
 (venv) C:\Users\L_Sharma\PycharmProjects\Test1>python manage.py
 makemigrations
 Traceback (most recent call last):
   File "manage.py", line 21, in 
 main()
   File "manage.py", 

[Django] #31374: Runtime Error unable to solve from forums/ FAQ

2020-03-17 Thread Django
#31374: Runtime Error unable to solve from forums/ FAQ
-+-
   Reporter:  l_sharma   |  Owner:  nobody
   Type: | Status:  new
  Uncategorized  |
  Component: |Version:  3.0
  Uncategorized  |
   Severity:  Normal |   Keywords:  django-pyodbc-azure
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I am trying to make connection with MS SQL with following settings

 DATABASES = {
 'default': {
 'ENGINE': 'sql_server.pyodbc',
 'NAME': 'dbName',
 'USER': 'userName',
 'PASSWORD': 'password',
 'HOST':'hostName',
 'PORT': 1433,
 'OPTIONS': {
 'driver': "SQL Server"
 }
 }
 }

 I had to downgrade to : pip install 'django-pyodbc-azure<1.11' which was
 otherwise giving me a error of No Server/DSN found. However after
 downgrading when I execute "python manage.py makemigrations" or python
 manage.py runserver.

 Following is my error, which I am unable to understand. Any help would be
 of great help.
 Thanks in advance.
 
"
 (venv) C:\Users\L_Sharma\PycharmProjects\Test1>python manage.py
 makemigrations
 Traceback (most recent call last):
   File "manage.py", line 21, in 
 main()
   File "manage.py", line 17, in main
 execute_from_command_line(sys.argv)
   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
 packages\django\core\management\__init__.py", line 367, in
 execute_from_command_line
 utility.execute()
   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
 packages\django\core\management\__init__.py", line 341, in execute
 django.setup()
   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
 packages\django\__init__.py", line 27, in setup
 apps.populate(settings.INSTALLED_APPS)
   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
 packages\django\apps\registry.py", line 108, in populate
 app_config.import_models(all_models)
   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
 packages\django\apps\config.py", line 199, in import_models
 self.models_module = import_module(models_module_name)
   File
 
"C:\Users\L_Sharma\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py",
 line 127, in import_module
 return _bootstrap._gcd_import(name[level:], package, level)
   File "", line 1014, in _gcd_import
   File "", line 991, in _find_and_load
   File "", line 975, in
 _find_and_load_unlocked
   File "", line 671, in _load_unlocked
   File "", line 783, in exec_module
   File "", line 219, in
 _call_with_frames_removed
   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
 packages\django\contrib\auth\models.py", line 4, in 
 from django.contrib.auth.base_user import AbstractBaseUser,
 BaseUserManager
   File "C:\Users\L_Sharma\PycharmProjects\Test1\venv\lib\site-
 packages\django\contrib\auth\base_user.py", line 52, in 
 class AbstractBaseUser(models.Model):
 RuntimeError: __class__ not set defining 'AbstractBaseUser' as . Was __classcell__
 propagated to type.__new__?

 
"

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.fc20bab2d182affbd5b16e965e996224%40djangoproject.com.