Comments (11)
Hi @danieldhz ,
I just want to collect more info. I guess you are following the guideline of ISP: https://developer.amazon.com/en-US/docs/alexa/in-skill-purchase/add-isps-to-a-skill.html#handle-results. Thus I guess you've done the Prerequisites and added the ISP to your custom skill. So when you list all ISPs, does the response looks good ?
I think you are still in development stage and thus this request is just a test purchase right ? Are you able to get the handle back after the purchase ?
Since we are the SDK team and not expert at ISP service, I just want to collect as much info as possible thus I could ask for service teams help if needed.
Thanks,
Shen
from alexa-skills-kit-sdk-for-python.
@ShenChen-Amazon Hi ShenChen, Thanks for your reply.
- I am not sure what you mean by listing ISPs, is there a way I can check that list?
- Yes, Exactly its a test purchase.
- If by handle back you mean JSON output, yes I did share it with you.
Sure man! Sorry if some my answers weren't what you were looking for. If they weren't could you please elaborate or let me know how I can provide the answer to your question.
from alexa-skills-kit-sdk-for-python.
For listing ISPs, there's an example in node, but it seems you already did the same by these code. It seems you save the result in session_attributes["entitledProducts"]. Could you please check if it contains the productID you use in GoogleIntentHandler ?
For the handle back, what I mean is the Connections.Respons. The JSON output you provided looks like not a Connection.Response. Thus I guess this error is thrown at the EntitledProductsCheckInterceptor where you trying to list all ISPs. Could you help me confirm that ?
Btw, are you able to see the ISP in developer console TOOLS In-Skill Products tab ?
Thanks,
Shen
from alexa-skills-kit-sdk-for-python.
so do you want me to print(session_attributes["entitledProducts"])
?
I am not sure where the error is thrown at but when I call the GoogleHandlerIntent it gives that error.
Hopefully this would shed some light, I have adjusted the line number in the error to the sample repo
[ERROR] 2020-08-27T21:10:10.461Z 6f1f5334-7e14-409f-9a99-996efb43a3ba The authentication token is invalid or doesn't have access to make this request
Traceback (most recent call last):
File "/opt/python/lib/python3.8/site-packages/ask_sdk_runtime/dispatch.py", line 118, in dispatch
output = self.__dispatch_request(handler_input) # type: Union[Output, None]
File "/opt/python/lib/python3.8/site-packages/ask_sdk_runtime/dispatch.py", line 114, in __dispatch_request
output = supported_handler_adapter.execute(
File "/opt/python/lib/python3.8/site-packages/ask_sdk_runtime/dispatch_components/request_components.py", line 437, in execute
return handler.handle(handler_input)
File "/var/task/lambda_function.py", line 166, in handle
in_skill_response=in_skill_product_response(handler_input)
File "/var/task/lambda_function.py", line 100, in in_skill_product_response
return ms.get_in_skill_products(locale)
File "/opt/python/lib/python3.8/site-packages/ask_sdk_model/services/monetization/monetization_service_client.py", line 129, in get_in_skill_products
api_response = self.invoke(
File "/opt/python/lib/python3.8/site-packages/ask_sdk_model/services/base_service_client.py", line 151, in invoke
raise ServiceException(message=exception_metadata.message,
I have adjust the line number in accordance with the [repo](https://github.com/danieldhz/Alexa_Timer/blob/master/lambda/ISP.py)
Yes, the ISP is added to the developer --> tools.
from alexa-skills-kit-sdk-for-python.
@danieldhz
Thanks for providing the error trace. From the error trace: File "/opt/python/lib/python3.8/site-packages/ask_sdk_model/services/monetization/monetization_service_client.py", line 129, in get_in_skill_products
I can confirm that the error is thrown during listing all ISPs in the EntitledProductsCheckInterceptor.
The EntitledProductsCheckInterceptor is a request Interceptor which will be executed before the
GoogleHandler handle the request. It try to get all ISPs and store it in session attribute. You could check whether the error is thrown on this line to verify.
Btw, the requestEvelope you provided is slightly modified right ? Otherwise the accessToken can't be that short..
Thanks,
Shen
from alexa-skills-kit-sdk-for-python.
@ShenChen-Amazon I am super glad that we are getting close to figuring out the issue. Sorry if I didn't share that error message earlier. Do you want me to check an error on line 121? Shall i do this by logger.info("Error calling InSkillProducts API: {}".format(result)) or print the whole script?
Correct, I trimmed it manually to save some space.
from alexa-skills-kit-sdk-for-python.
Hi @danieldhz
Would be great if you could use try catch block, move line 121 to try block and log the error object at the catch block.
To summarize, you've added a ISP product to your skill, however, when you call the get_in_skill_products function, it says you don't have the permission to access the ISPs. Since I don't have more detailed error info, would need to reach out to service team for further investigation. Could you please provide with your VendorID and Skill id ? VendorID could be seen at: https://developer.amazon.com/mycid.html after login.
from alexa-skills-kit-sdk-for-python.
I would definitely do try catch & let you know about the error. I actually get the error when I call GoogleIntentHandler, as the get_in_skill_products function is not even added to the .add_request_handler. My Vendor ID: M9ATP1D4JWXUB
Skill Id: amzn1.ask.skill.78f63c60-18ac-4944-a2da-5642ad214373
from alexa-skills-kit-sdk-for-python.
get_in_skill_products is called inside EntitledProductsCheckInterceptor, and this is added as requestInterceptor instead of requestHandler: https://github.com/danieldhz/Alexa_Timer/blob/master/lambda/ISP.py#L194.
Did you mean the error exist even if you don't added it to add_global_request_interceptor ?
from alexa-skills-kit-sdk-for-python.
I am not sure about how get_in_skill_products is inside EntitledProductsCheckInterceptor as it's not indented inwards? btw do you know what type of error I shall raise?
from alexa-skills-kit-sdk-for-python.
Duplicate of alexa-samples/skill-sample-python-fact-in-skill-purchases#8
from alexa-skills-kit-sdk-for-python.
Related Issues (20)
- Sb Conflicting each other HOT 5
- `ModuleNotFoundError:` No module named 'asn1crypto'`` when importing skill adapter from flask HOT 3
- 'NoneType' object has no attribute 'system' HOT 2
- Link how to create a new security profile should be updated HOT 1
- Golang SDK - Alexa Skills kit HOT 2
- User with almost all scopes types receives unauthorized_client error HOT 2
- UserAgentManager missing from 1.15 PyPI distro HOT 3
- Alexa HOT 1
- Fail to import local modules HOT 6
- I have a intent for the alexa skill which has two slots, one of them is fulfilled while invoking the skill. I want the second slot to store the value uttered by the user at a later point of time. Is there a way to do so using python HOT 1
- Cannot import the SpokenInfo class (ask_sdk_model.services.reminder_management) HOT 2
- Receiving unauthorized_client error trying to list all skills HOT 3
- SpeakDirective doesn't create correct audio src directive HOT 1
- Outdated version of cryptography? HOT 5
- Invalid signatures with django-ask-sdk since ask-sdk-webservice-support v1.3.3 HOT 4
- ENDPOINT_TIMEOUT is not handled properly in Incorrect handling of SessionEndedRequest.
- AskForPermissionsConsentCard not showing the option to activate requested permission HOT 2
- documentation error - local_debug.py
- Bug report : Sending a voice forward consent start connection directive returns error "ask_sdk_core/response_helper.py directive.object_type has no attribute 'object_type'"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alexa-skills-kit-sdk-for-python.