https://bitbucket.org/chris1610/satchmo/pull-request/8/fix-for-canada-post-module

On Aug 1, 9:19 pm, Chris Moffitt <[email protected]> wrote:
> This is a bug in the Canada Post Module. We should handle this response more
> gracefully.
>
> Feel free to submit a patch.
>
> -Chris
>
>
>
>
>
>
>
> On Mon, Aug 1, 2011 at 2:50 PM, Marco <[email protected]> wrote:
> > Hello,
>
> > I am using the the canada post module. In the Site Settings, I have
> > both domestic and US shipping options available to the customer. The
> > module works well when the CanadaPost API returns a date within the
> > <deliveryDate> tag, but causes a ValueError when strings are returned
> > in this tag. Is this a bug that needs to be updated in the satchmo
> > canadapost shipping module, or am I missing something?
>
> > Here is an example of XML returned by Canada Post that shows strings
> > within the deliveryDate tag:
>
> > <eparcel>
> > <ratesAndServicesResponse>
> > <statusCode>1</statusCode>
> > <statusMessage>OK</statusMessage>
> > <requestID>2546938</requestID>
> > <handling>0.0</handling>
> > <language>0</language>
>
> > <product id="2040" sequence="1">
> > <name>Priority Worldwide USA</name>
> > <rate>95.61</rate>
> > <shippingDate>2011-08-03</shippingDate>
> > <deliveryDate>www.canadapost.ca</deliveryDate>
> > <deliveryDayOfWeek>4</deliveryDayOfWeek>
> > <nextDayAM>false</nextDayAM>
> > <packingID>P_0</packingID>
> > </product>
>
> > <product id="2030" sequence="2">
> > <name>Xpresspost USA</name>
> > <rate>28.21</rate>
> > <shippingDate>2011-08-03</shippingDate>
> > <deliveryDate>2011-08-05</deliveryDate>
> > <deliveryDayOfWeek>6</deliveryDayOfWeek>
> > <nextDayAM>false</nextDayAM>
> > <packingID>P_0</packingID>
> > </product>
>
> > <product id="2015" sequence="3">
> > <name>Small Packets Air</name>
> > <rate>30.72</rate>
> > <shippingDate>2011-08-03</shippingDate>
> > <deliveryDate>up to 2 weeks</deliveryDate>
> > <deliveryDayOfWeek>4</deliveryDayOfWeek>
> > <nextDayAM>false</nextDayAM>
> > <packingID>P_1</packingID>
> > </product>
>
> > <product id="2005" sequence="4">
> > <name>Small Packets Surface</name>
> > <rate>24.82</rate>
> > <shippingDate>2011-08-03</shippingDate>
> > <deliveryDate>2 to 4 weeks</deliveryDate>
> > <deliveryDayOfWeek>4</deliveryDayOfWeek>
> > <nextDayAM>false</nextDayAM>
> > <packingID>P_1</packingID>
> > </product>
>
> > dot dot dot
>
> > which explains the error I get: invalid literal for int() with base
> > 10: 'up t'
>
> > --
> > 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.

-- 
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