cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP CAI Python Flask integration error - Type Error: 'NoneType' object is not subscriptable

kjyothiraditya
Participant
0 Likes
1,345

Tutorials: https://developers.sap.com/tutorials/conversational-ai-api-oauth.html
--------------------------

Hi Experts,

When I am testing st step 8, I am getting this error.

TypeError: 'NoneType' object is not subscriptable

At the bottom of dump shown, I am getting this error:

chatbot-api.py", line 40, in api

This the response from api function:

Results:
<Response [400]>
Content
b'{"logs":[],"results":null,"message":"Request is invalid","error":{"error_code":"JTech - 1002","uuid":"7d5d98d7-c03d-49f9-b903-336baa0cad1c","details":["HV000090: Unable to access isConversationIdSet."]}}' 

Please help.chatbot-api.txt

Regards,

Aditya

Accepted Solutions (0)

Answers (2)

Answers (2)

Dan_Wroblewski
Developer Advocate
Developer Advocate

First, Step 8 is the question on the tutorial, so how can you get an error?

Second, can you explain more what you are doing when you get the error? Are you able to start the Flask server? Can you show the Terminal output when you run the application? Can you call the server with just / route and do you get 404 error? Are you able to do the Postman version: https://developers.sap.com/tutorials/conversational-ai-api-oauth-postman.html

And what is line 40 for you? For me it is part of the caching code and I assume you did not get the proper response and then tried to access a dictionary with a None index.

0 Likes

Team, I am trying to register the subscription-manager on new Linux server, preparing for the SAP application server, but I am getting this error. Any fix or workaround? Highly apricated.

2022-09-01 17:12:45,296 [ERROR] subscription-manager:801966:MainThread @managercli.py:219 - 'NoneType' object is not subscriptable

Traceback (most recent call last):

File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1600, in _do_command

no_owner_cb=self._no_owner_cb

File "/usr/lib64/python3.6/site-packages/rhsmlib/services/register.py", line 190, in determine_owner_key

return owners[0]['key']

TypeError: 'NoneType' object is not subscriptable