Chris,

I am having trouble making the import function work on a YAML file
generated by the export function. Had some TypeErrors (infile not
subscriptable), these were passed by changing lines in satchmo/product/
forms.py:

> 181   filetype = infile['content-type']
> 182   filename = infile['filename']
> 183   raw = infile['content']

to the following:

> 181   filetype = infile.content_type
> 182   filename = infile.name
> 183   raw = infile.readlines()

I don't claim to understand why it may have worked before but now I'm
hung up on the deserialization step.

Here is my YAML:

> - fields:
>     active: true
>     also_purchased: []
>     category: [3]
>     date_added: 2008-11-08
>     description: my-product-id
>     featured: true
>     height: '3.25'
>     height_units: in
>     items_in_stock: -10
>     length: '6.75'
>     length_units: in
>     meta: ''
>     name: my-product-id
>     ordering: 0
>     related_items: []
>     shipclass: DEFAULT
>     short_description: This is the short description.
>     site: 1
>     sku: my-product-id
>     slug: my-product-id
>     taxClass: null
>     taxable: false
>     total_sold: 0
>     weight: '1.5'
>     weight_units: lb
>     width: '5.25'
>     width_units: in
>   model: product.product
>   pk: 1
> - fields: {expires: null, price: '199', product: 1, quantity: 10}
>   model: product.price
>   pk: 2
> - fields: {expires: null, price: '299', product: 1, quantity: 1}
>   model: product.price
>   pk: 1
> - fields: {caption: my-product-id, picture: 
> images/productimage-picture-my-product-id-2.jpg,
>     product: 1, sort: 1}
>   model: product.productimage
>   pk: 2
>

Line 262 of forms.py, 'for obj in objects:', appears to throw the
error 'string indices must be integers'.

Is the import facility *currently* working for you?
Do you have an example import file that should work on my Satchmo
installation?

Your kind advice much appreciated.

Chris Ghormley
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo users" 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/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to