Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProgrammingError: can't adapt type 'ImageFieldFile' #4

Closed
aykut opened this issue Nov 4, 2014 · 1 comment
Closed

ProgrammingError: can't adapt type 'ImageFieldFile' #4

aykut opened this issue Nov 4, 2014 · 1 comment
Labels

Comments

@aykut
Copy link
Owner

aykut commented Nov 4, 2014

When casting file types, postgres throws an error.

ProgrammingError                          Traceback (most recent call last)
<ipython-input-4-e56590351e17> in <module>()
----> 1 bulk_update(profiles)

/Users/aykutozat/.virtualenvs/gezi/lib/python2.7/site-packages/bulk_update/helper.py in bulk_update(objs, update_fields, exclude_fields, using, batch_size)
     63             _batched_update(objs[batch_size:], fields, batch_size, connection)
     64
---> 65     _batched_update(objs, fields, batch_size, connection)

/Users/aykutozat/.virtualenvs/gezi/lib/python2.7/site-packages/bulk_update/helper.py in _batched_update(objs, fields, batch_size, connection)
     59             del values, pks
     60
---> 61             connection.cursor().execute(sql, paramaters)
     62
     63             _batched_update(objs[batch_size:], fields, batch_size, connection)

/Users/aykutozat/.virtualenvs/gezi/lib/python2.7/site-packages/django/db/backends/util.pyc in execute(self, sql, params)
     67         start = time()
     68         try:
---> 69             return super(CursorDebugWrapper, self).execute(sql, params)
     70         finally:
     71             stop = time()

/Users/aykutozat/.virtualenvs/gezi/lib/python2.7/site-packages/django/db/backends/util.pyc in execute(self, sql, params)
     51                 return self.cursor.execute(sql)
     52             else:
---> 53                 return self.cursor.execute(sql, params)
     54
     55     def executemany(self, sql, param_list):

/Users/aykutozat/.virtualenvs/gezi/lib/python2.7/site-packages/django/db/utils.pyc in __exit__(self, exc_type, exc_value, traceback)
     97                 if dj_exc_type not in (DataError, IntegrityError):
     98                     self.wrapper.errors_occurred = True
---> 99                 six.reraise(dj_exc_type, dj_exc_value, traceback)
    100
    101     def __call__(self, func):

/Users/aykutozat/.virtualenvs/gezi/lib/python2.7/site-packages/django/db/backends/util.pyc in execute(self, sql, params)
     51                 return self.cursor.execute(sql)
     52             else:
---> 53                 return self.cursor.execute(sql, params)
     54
     55     def executemany(self, sql, param_list):

ProgrammingError: can't adapt type 'ImageFieldFile'
@aykut aykut added the bug label Nov 4, 2014
@aykut
Copy link
Owner Author

aykut commented Nov 13, 2014

#2 solved this.

@aykut aykut closed this as completed Nov 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant