fopina / django-bulk-update-or-create

`bulk_update_or_create` for Django model managers
MIT License
148 stars 16 forks source link

ImportError: cannot import name 'DefaultConnectionProxy' from 'django.db' #21

Closed samLozier closed 3 years ago

samLozier commented 3 years ago

Hi, this package has been working well for me until earlier today when I ran some updates, now I'm getting the following error:

ImportError: cannot import name 'DefaultConnectionProxy' from 'django.db' `

here's the full trace.

from . import views File "/Users/sam/Documents/Pythonprojects/website/reporting_website/lightspeed_app/views.py", line 11, in <module> from django_pg_bulk_update import bulk_update_or_create as pg_bulk_update_or_create File "/Users/sam/Documents/Pythonprojects/website/reporting_website/ENV/lib/python3.9/site-packages/django_pg_bulk_update/__init__.py", line 1, in <module> from .query import * # noqa: F401, F403 File "/Users/sam/Documents/Pythonprojects/website/reporting_website/ENV/lib/python3.9/site-packages/django_pg_bulk_update/query.py", line 17, in <module> from .compatibility import get_postgres_version, get_model_fields, returning_available, string_types File "/Users/sam/Documents/Pythonprojects/website/reporting_website/ENV/lib/python3.9/site-packages/django_pg_bulk_update/compatibility.py", line 13, in <module> from .types import TDatabase File "/Users/sam/Documents/Pythonprojects/website/reporting_website/ENV/lib/python3.9/site-packages/django_pg_bulk_update/types.py", line 3, in <module> from django.db import DefaultConnectionProxy ImportError: cannot import name 'DefaultConnectionProxy' from 'django.db' (/Users/sam/Documents/Pythonprojects/website/reporting_website/ENV/lib/python3.9/site-packages/django/db/__init__.py)

looking in the django.db file, I see ConnectionProxy, but no DefaultConnectionProxy

fopina commented 3 years ago

According to your stacktrace, this is not the package you’re using (this is not django_pg..)

feel free to try this one though :)