#Raghavendra-stripe-proxy
1 messages ยท Page 1 of 1 (latest)
Hi hmunzo
I am using python : to access stripe data as below:
import stripe
#Set Proxy
stripe.proxy = "http://webgateway.itm.mcafee.com:9090"
stripe.api_version = "2022-08-01"
#Function to fetch Customer ID
Use Stripe's library to make requests
def stripeCheckSubscription():
#stripe.proxy = "http://webgateway.itm.mcafee.com:9090"
vEmail = 'test1@mcafee.com'
vCustID = ""
stripe.api_key = "sk_tesoxcUZIqDJx4zSbi"
vCustomerDetails = stripe.Customer.list(email=vEmail)
for cust in vCustomerDetails:
vCustID = cust.id
if (vCustID):
result = "1"
vstripeSub = stripe.Subscription.list(limit=3, status='canceled', customer=vCustID)
for i, Sub in enumerate(vstripeSub):
if i == 0:
if (Sub.status == "canceled"):
result = result+"0"
return result
break
else:
result = result+"1"
return result
break
else:
result = "00"
return result
i am getting user warning as below:
ers\rrao3\PycharmProjects\pythonProject\venv\Scripts\python.exe E:/Installations/Python/Lib/site-packages/StripeCheck.py
E:\Installations\Python\Lib\site-packages\stripe\api_requestor.py:93: UserWarning: stripe.proxy was updated after sending a request - this is a no-op. To use a different proxy, set stripe.default_http_client to a new client configured with the proxy.
warnings.warn(
please help
give me a bit
you shared your test mode secret key there, can you please remove that sk_test_123 ID from the above message pls?
yes its not the complete id i have removed few characters in them
can you add log lines in your code to just before you are setting proxy anywhere and see which line of code it is giving you that warning on?
I imagine you're setting proxy = ... multiple times in your code somewhere
I am helping
I'm asking if you can add log lines to your code
so we can trace exactly what is happening just before you get the warning
yes its because i am calling customer & subscription in one function
as i could see
if i call in different i wont get this warning ๐ฆ