On Wednesday, November 7, 2012 6:16:23 AM UTC-7, Michał Nowotka wrote:
>
> Hello,
> I'm working with oracle legacy DB and need to read and write binary data 
> (png images, and and MDL *Molfiles*).
> Django's inspectdb command generated text fields for these columns, saying 
> that's only a guess.
> Now, when I'm trying to retrieve a value from this class fields i get:
> DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 
> 0: invalid start byte.
> error. 
>
> Is there any way to read and write these columns?
> Any help would be appreciated.
>

Django has no built-in field type for BLOB columns.  You might try using 
the custom field type given in one of the answers here:

http://stackoverflow.com/questions/5581466/django-models-blob-field

I haven't used this myself, so I can't vouch for how well it will work.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/4EzQIAYCLjQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to