Code

Opened 9 months ago

Last modified 8 months ago

#20879 new Bug

BinaryField doesn't work with Oracle on Python3

Reported by: slafs Owned by: nobody
Component: Database layer (models, ORM) Version: 1.6-beta-1
Severity: Normal Keywords: BinaryField Oracle Python3
Cc: shai@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I made a repo as a showcase of this bug https://bitbucket.org/slafs/test-django-binaryfield-oracle-py3

The test case in this repo is taken from Django testsuite.

The exception i'm getting is this:

django.utils.encoding.DjangoUnicodeDecodeError: 'utf-8' codec can't decode byte 0xfe in position 2: invalid start byte. You passed in b'\x00F\xfe' (<class 'bytes'>)

The problem is with handling Oracle params in django.db.backends.oracle.base.OracleParam class. I think I may have a solution on this.

Attachments (0)

Change History (2)

comment:1 Changed 9 months ago by shai

  • Cc shai@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Hi, and thanks for your report.

I am looking forward to seeing what you come up with. Please also specify exactly which Python3 and Oracle versions you are working with -- there are known Unicode problems related to bugs in certain versions of Oracle (#20292).

Also, you should be aware that Oracle under Python3 is generally broken (#20725), so the problem may lie deeper than you think.

comment:2 Changed 8 months ago by timo

  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Bug

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.