On 9/22/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
> On Sep 21, 2007, at 1:43 PM, m h wrote:
>
> >
> > Just for kicks I tried using .3.10 and it failed giving the same error
> > that was reported in the Aug 18 thread "autoloading Oracle tables with
> > column defaults"::
> >
> > File "/home/matt/work/vpython/lib/python2.4/site-packages/
> > SQLAlchemy-0.3.10-py2.4.egg/sqlalchemy/databases/oracle.py",
> > line 117, in convert_result_value
> >     return value.read()
> > AttributeError: 'str' object has no attribute 'read'
> >
> > I can stay with .3.7, but I'm just wondering what the deal is with
> > beta5.
> >
>
> lets see that query youre running (and the bind params youre
> sending...oh and the table schema too).  its guaranteed something
> small on our end or maybe on yours.
>

Here's the query that's failing::

SELECT "PRODUCT_DIM".deptnm AS "DEPARTMENT", "PRODUCT_DIM".groupnumnm
AS "CATEGORY", "PRODUCT_DIM".categorynumnm AS "SUBCATEGORY",
"PRODUCT_DIM".upcdesc AS "DESCRIPTION", "PRODUCT_DIM".freeformsz AS
"SIZE", "STORE_DIM".orglevel1 AS "STORE CHAIN", "STORE_DIM".store AS
"STORE NAME", "STORE_DIM".state AS "STATE", "STORE_DIM".county AS
"COUNTY", "PRODUCT_DIM".upc AS "UPC", "PRODUCT_DIM".groupnumnm AS
"group num", sum("WEEK_SALES_FACT".units *
(coalesce("WEEK_SALES_FACT".dealamt, :coalesce) +
coalesce("WEEK_SALES_FACT".purbillback, :coalesce_1) +
coalesce("WEEK_SALES_FACT".scanbillback, :coalesce_2))) AS "current
allowances", sum("WEEK_SALES_FACT".sales -
coalesce("WEEK_SALES_FACT".cost, :coalesce_3)) AS margin,
sum("WEEK_SALES_FACT".sales) AS sales, sum("WEEK_SALES_FACT".units) AS
units
FROM "PRODUCT_DIM", "STORE_DIM", "WEEK_SALES_FACT", "AD_WEEK_CALENDAR_DIM"
WHERE "AD_WEEK_CALENDAR_DIM".adweekid = "WEEK_SALES_FACT".adweekid AND
"PRODUCT_DIM".upc = "WEEK_SALES_FACT".upc AND "STORE_DIM".stornum =
"WEEK_SALES_FACT".stornum AND "AD_WEEK_CALENDAR_DIM".adwkenddt BETWEEN
to_date(:to_date, :to_date_1) AND to_date(:to_date_2, :to_date_3) AND
"PRODUCT_DIM".groupnumnm = :PRODUCT_DIM_groupnumnm AND
"PRODUCT_DIM".upc = :PRODUCT_DIM_upc GROUP BY "PRODUCT_DIM".deptnm,
"PRODUCT_DIM".groupnumnm, "PRODUCT_DIM".categorynumnm,
"PRODUCT_DIM".upcdesc, "PRODUCT_DIM".freeformsz,
"STORE_DIM".orglevel1, "STORE_DIM".store, "STORE_DIM".state,
"STORE_DIM".county, "PRODUCT_DIM".upc ORDER BY
"PRODUCT_DIM".groupnumnm ASC


Here's the parameters::


{'to_date_2': '12/30/03', 'to_date_3': 'MM/DD/RR', 'PRODUCT_DIM_upc':
3900008483.0, 'to_date_1': 'MM/DD/RR', 'coalesce_2': 0, 'coalesce_3':
0, 'coalesce_1': 0, 'PRODUCT_DIM_groupnumnm': '"', 'coalesce': 0,
'to_date': '12/26/03'}

I'm reflecting the tables, so I don't have code for them.
I can't really publish the schema here, but all the columns are either
dates, varchars or numbers.  The one value that is getting converted
to a float (in the beta version not .3.7) is PRODUCT_DIM_upc (which
should be a number).

-matt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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