On Oct 3, 10:58 pm, Sean Davis <[EMAIL PROTECTED]> wrote:
> ProgrammingError: (ProgrammingError) can't adapt 'INSERT INTO
> runbrowser_image (id, nobj, focusmetric, focusuniformity, choffset_x,
> choffset_y, blu, flu, int_min, int_mean, int_stdev, int_max,
> int_median, int_q87, nse_min, nse_mean, nse_stdev, nse_max, base,
> tile_id) VALUES (%(id)s, %(nobj)s, %(focusmetric)s, %
> (focusuniformity)s, %(choffset_x)s, %(choffset_y)s, %(blu)s, %(flu)s, %
> (int_min)s, %(int_mean)s, %(int_stdev)s, %(int_max)s, %(int_median)s, %
> (int_q87)s, %(nse_min)s, %(nse_mean)s, %(nse_stdev)s, %(nse_max)s, %
> (base)s, %(tile_id)s)' {'int_q87': 6499.1149999999998,
> 'focusuniformity': 95.199389999999994, 'nse_mean': 273.32986499999998,
> 'int_stdev': 2763.3670000000002, 'blu': 68.976844799999995, 'nobj':
> 14597, 'flu': 68.258520000000004, 'int_min': -1874.1673599999999,
> 'choffset_y': 0.0, 'choffset_x': 0.0, 'int_mean': 2965.79126, 'base':
> 'A', 'nse_stdev': 110.751434, 'int_median': 2022.095, 'nse_min': 0.0,
> 'nse_max': 732.83330000000001, 'tile_id': 37504, 'int_max':
> 19389.404299999998, 'id': 2L, 'focusmetric': 77.384469999999993}
>
> The table is described as:
>
> class RunBrowserImage(Base):
>     __tablename__ = "runbrowser_image"
>
>     id = Column(Integer,primary_key=True)
>     nobj = Column(Integer)
>     focusmetric = Column(Float)
>     focusuniformity = Column(Float)
>     choffset_x = Column(Float)
>     choffset_y = Column(Float)
>     blu = Column(Float)
>     flu = Column(Float)
>     int_min = Column(Float)
>     int_mean = Column(Float)
>     int_stdev = Column(Float)
>     int_max = Column(Float)
>     int_median = Column(Float)
>     int_q87 = Column(Float)
>     nse_min = Column(Float)
>     nse_mean = Column(Float)
>     nse_stdev = Column(Float)
>     nse_max = Column(Float)
>     base = Column(CHAR(1))
>     tile_id = Column(Integer,ForeignKey('runbrowser_tile.id'))
>
>     tile = relation(RunBrowserTile,backref=backref('images'))
>
> I cannot figure out why the error.  I know it must be something
> obvious, but I can't find it.

This was due to not casting the base() column to a unicode string (or,
at least, it fixed the problem).

Sean

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to