-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurred while communicating with the Analytics Extension #449
Comments
Issue resolved after i passed the parameter as the first item in the list. |
Hi there, I am also getting the same error on Tableau. Please help. Unable to complete action My deployed function works absolutely fine, however it is unable to communicate with the endpoint. Below is the code: Connect to TabPy server using the client libraryimport tabpy_client The scoring function that will use the Catboost Classifier to classify new data pointsdef CandidateClassifier(_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9,_arg10,_arg11,_arg12,_arg13,_arg14,_arg15,
Publish the SuggestDiagnosis function to TabPy server so it can be used from TableauUsing the name and a short description of what it doesconnection.deploy('Hackathon', connection.get_endpoints() {'Hackathon': {'schema': None, 'last_modified_time': datetime.datetime(2020, 9, 25, 22, 12, 16), 'dependencies': [], 'creation_time': datetime.datetime(2020, 9, 25, 22, 12, 16), 'type': 'model', 'name': 'Hackathon', 'version': 1, 'description': 'Number of Candidates we can expect in the given settings'}} #can run queries to TabPy outside Tableau as well. =============================ERROR==============================================ResponseError Traceback (most recent call last) C:**\tabpy_client\client.py in query(self, name, *args, **kwargs) C:**\tabpy_client\rest_client.py in query(self, name, *args, **kwargs) C:\tabpy_client\rest.py in POST(self, url, data, timeout) C:\tabpy_client\rest.py in POST(self, url, data, timeout) C:\tabpy_client\rest.py in raise_error(self, response) ResponseError: (500) Error querying GLS {'uri': 'Hackathon', 'error': "AttributeError : 'AttributeError' object has no attribute 'message'", 'type': 'QueryFailed'} |
Environment information:
Describe the issue
I have a use case in which i have to use tableau to fetch the results from a REST API endpoint. The goal is to let the user enter or select latitude and longitude and pass those arguments to fetch the results (dictionary or a list - any would work) from the rest api end point.
I have implemented the function that fetches the scores and the code for that is attached in the next section. When i try doing - client.query('getscoreList', 38.482, -78.80), i get the results which confirms that the deployed .pkl is working fine. But when i try to query it from the calculation in tableau it gives me following error -
Unable to complete action
An error occurred while communicating with the Analytics Extension.
Error Code: 6116DD27
Error processing script
The endpoint you're trying to query did not respond. Please make sure the endpoint exists and the correct set of arguments are provided.
To Reproduce
The script used to deploy the function that interacts with the API is -
from tabpy_client import Client
import pandas as pd
import json
import glob
import requests
import urllib3
import time
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
client = Client("http://localhost:9004/")
def getscoreList(latitude,longitude) :
client.deploy('getscoreList',getscoreList,"get score list",override = True)
The script in tableau calculation is -
SCRIPT_REAL("
return tabpy.query('getscoreList',_arg1,_arg2) ['response']",[latitude],[longitude])
Expected behavior
Ideally, i expect the calculation to return a list of scores (a dictionary or a dataframe would be even better) that are being retrieved from the API end point.
If there is some other way i should be working with the REST API endpoint, i would appreciate that. On running the query -
client.query('getscoreList', 38.482, -78.80)
I get the following result -
{'response': [52.0,
44.0,
48.0,
52.0,
59.0,
50.0,
52.0,
47.0,
34.0,
7.0,
9.0,
13.0,
16.0,
9.0,
15.0,
19.0,
9.0,
18.0,
30.0,
100.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
94.0,
100.0,
100.0,
94.0,
100.0,
100.0,
94.0,
98.0,
100.0,
32.0,
32.0,
33.0,
32.0,
23.0,
19.0,
32.0,
30.0,
39.0],
'version': 1,
'model': 'getscoreList',
'uuid': '98061656-e5d2-4c86-bad7-ee38ad26dec6'}
Screenshots
Attaching screenshots of the error and the text file with the result in the command window
error log.txt
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: