Got word back from pythonanywhere. They tried adding it to the whitelist, 
but it still had bugs because there were issues with whatever Python API 
was being used (probably on the end of both pythonanywhere and stripe) to 
handle https requests, since the pythonanywhere free user account goes 
through a proxy server. If I were to purchase a paid account with them, it 
wouldn't go through the proxy server and it works fine (they tested it). I 
have seen issues mentioned elsewhere of Python libraries mishandling https 
through proxy servers (see this topic in StackOverflow, for 
example<http://stackoverflow.com/questions/14390605/python-requests-ssl-issue>).
 
Pythonanywhere seems to want to close this issue, but I will see if 
something better can be worked out.

On Thursday, April 11, 2013 10:29:34 PM UTC-4, David Ripplinger wrote:
>
> I found the message from the u.read(). It is an html message:
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------
> ERROR The requested URL could not be retrieved 
> ------------------------------
>  
> The following error was encountered while trying to retrieve the URL: 
> https://sk_test_osybducdtvurcbryb6lv7...@api.stripe.com/v1/charges
>
> *Unsupported Request Method and Protocol*
>
> Squid does not support all request methods for all access protocols. For 
> example, you can not POST a Gopher request.
>
> Your cache administrator is webmaster <webmaster%25W>.
>
>  ------------------------------
>  
> Generated Fri, 12 Apr 2013 02:17:10 GMT by harry-liveproxy 
> (squid/2.7.STABLE9)
>
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> This is the same message I was getting before when I was using stripe the 
> conventional way (i.e., using their API and tokens instead of Massimo's 
> module) while running on pythonanywhere. Although this message was 
> difficult for me to understand, it looks like your suspicions about the 
> host blocking certain communications are correct. I just got feedback on 
> the pythonanywhere forum stating that there is a whitelist of domains that 
> free users of pythonanywhere (that's me) can communicate with. So it looks 
> like all I have to do is convince them to add api.stripe.com to the 
> whitelist, which they probably will do.
>
> On Thursday, April 11, 2013 9:12:29 PM UTC-4, Alan Etkin wrote:
>>
>> Here's the traceback
>>
>> ...
>>>
>>> File "/home/davidrip/web2py/gluon/contrib/stripe.py", line 46, in charge
>>>
>>>  
>>
>> According to the simplejson error, the u object pulled from the url is 
>> returning mangled json input (or not json at all). Maybe you could examine 
>> the u.read() output of line 46 in stripe.py to check if there's any issue 
>> related to server-side requests (perhaps some hosting network restriction?).
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to