Skip to content

Instantly share code, notes, and snippets.

@smithdc1
Created February 23, 2022 21:22
Show Gist options
  • Save smithdc1/e2a1dbae04d2e06391bbde129e1e21ad to your computer and use it in GitHub Desktop.
Save smithdc1/e2a1dbae04d2e06391bbde129e1e21ad to your computer and use it in GitHub Desktop.
postgres
======================================================================
ERROR: test_bulk_update (postgres_tests.test_bulk_update.BulkSaveTests) [<object object at 0x000002D559D6DFE0>] (model=<class 'postgres_tests.models.HStoreModel'>, field='field')
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: can't adapt type 'dict'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 499, in subTest
yield
File "C:\Users\smith\PycharmProjects\django\tests\postgres_tests\test_bulk_update.py", line 40, in test_bulk_update
instances = Model.objects.bulk_create(
File "c:\users\smith\pycharmprojects\django\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 682, in bulk_create
returned_columns = self._batched_insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1578, in _batched_insert
self._insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1552, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "c:\users\smith\pycharmprojects\django\django\db\models\sql\compiler.py", line 1638, in execute_sql
cursor.execute(sql, params)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 67, in execute
return self._execute_with_wrappers(
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "c:\users\smith\pycharmprojects\django\django\db\utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: can't adapt type 'dict'
======================================================================
ERROR: test_bulk_update (postgres_tests.test_bulk_update.BulkSaveTests) [<object object at 0x000002D559D6DFE0>] (model=<class 'postgres_tests.models.RangesModel'>, field='ints')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 499, in subTest
yield
File "C:\Users\smith\PycharmProjects\django\tests\postgres_tests\test_bulk_update.py", line 40, in test_bulk_update
instances = Model.objects.bulk_create(
File "c:\users\smith\pycharmprojects\django\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 682, in bulk_create
returned_columns = self._batched_insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1578, in _batched_insert
self._insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1552, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "c:\users\smith\pycharmprojects\django\django\db\models\sql\compiler.py", line 1638, in execute_sql
cursor.execute(sql, params)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 67, in execute
return self._execute_with_wrappers(
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 83, in _execute
self.db.validate_no_broken_transaction()
File "c:\users\smith\pycharmprojects\django\django\db\backends\base\base.py", line 520, in validate_no_broken_transaction
raise TransactionManagementError(
django.db.transaction.TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
======================================================================
ERROR: test_bulk_update (postgres_tests.test_bulk_update.BulkSaveTests) [<object object at 0x000002D559D6DFE0>] (model=<class 'postgres_tests.models.RangesModel'>, field='dates')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 499, in subTest
yield
File "C:\Users\smith\PycharmProjects\django\tests\postgres_tests\test_bulk_update.py", line 40, in test_bulk_update
instances = Model.objects.bulk_create(
File "c:\users\smith\pycharmprojects\django\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 682, in bulk_create
returned_columns = self._batched_insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1578, in _batched_insert
self._insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1552, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "c:\users\smith\pycharmprojects\django\django\db\models\sql\compiler.py", line 1638, in execute_sql
cursor.execute(sql, params)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 67, in execute
return self._execute_with_wrappers(
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 83, in _execute
self.db.validate_no_broken_transaction()
File "c:\users\smith\pycharmprojects\django\django\db\backends\base\base.py", line 520, in validate_no_broken_transaction
raise TransactionManagementError(
django.db.transaction.TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
======================================================================
ERROR: test_bulk_update (postgres_tests.test_bulk_update.BulkSaveTests) [<object object at 0x000002D559D6DFE0>] (model=<class 'postgres_tests.models.OtherTypesArrayModel'>, field='ips')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 499, in subTest
yield
File "C:\Users\smith\PycharmProjects\django\tests\postgres_tests\test_bulk_update.py", line 40, in test_bulk_update
instances = Model.objects.bulk_create(
File "c:\users\smith\pycharmprojects\django\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 682, in bulk_create
returned_columns = self._batched_insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1578, in _batched_insert
self._insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1552, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "c:\users\smith\pycharmprojects\django\django\db\models\sql\compiler.py", line 1638, in execute_sql
cursor.execute(sql, params)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 67, in execute
return self._execute_with_wrappers(
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 83, in _execute
self.db.validate_no_broken_transaction()
File "c:\users\smith\pycharmprojects\django\django\db\backends\base\base.py", line 520, in validate_no_broken_transaction
raise TransactionManagementError(
django.db.transaction.TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
======================================================================
ERROR: test_bulk_update (postgres_tests.test_bulk_update.BulkSaveTests) [<object object at 0x000002D559D6DFE0>] (model=<class 'postgres_tests.models.OtherTypesArrayModel'>, field='json')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Users\smith\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 499, in subTest
yield
File "C:\Users\smith\PycharmProjects\django\tests\postgres_tests\test_bulk_update.py", line 40, in test_bulk_update
instances = Model.objects.bulk_create(
File "c:\users\smith\pycharmprojects\django\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 682, in bulk_create
returned_columns = self._batched_insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1578, in _batched_insert
self._insert(
File "c:\users\smith\pycharmprojects\django\django\db\models\query.py", line 1552, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "c:\users\smith\pycharmprojects\django\django\db\models\sql\compiler.py", line 1638, in execute_sql
cursor.execute(sql, params)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 67, in execute
return self._execute_with_wrappers(
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "c:\users\smith\pycharmprojects\django\django\db\backends\utils.py", line 83, in _execute
self.db.validate_no_broken_transaction()
Ran 15612 tests in 946.756s
FAILED (errors=5, skipped=658, expected failures=7)
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...
Destroying test database for alias 'other'...
Destroying test database for alias 'other'...
PS C:\Users\smith\PycharmProjects\django\tests>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment