Skip to content

Commit 6afd139

Browse files
author
Nabeel
committed
Bug fix for REST calls from load script
Bug fix for REST call to a model from the load script.
1 parent 4b2854f commit 6afd139

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

core/_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def _get_rest_response(self, X):
472472
payload_header = None if len(self.model['json'].keys()) == 0 else next(iter(self.model['json']))
473473

474474
# Make a REST call for each sample
475-
for i in range(len(X)):
475+
for i in X.index:
476476
# Next the JSON payload if required
477477
self.model['json'] = dict(X.loc[i,:].astype("str").T) if payload_header is None else {payload_header: dict(X.loc[i,:].astype("str").T)}
478478

docker/Dockerfile v.8.1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Use the previous version of qlik-py-tools as a parent image
2+
FROM nabeeloz/qlik-py-tools:8.0
3+
4+
# Set the working directory to /qlik-py-tools/core
5+
WORKDIR /qlik-py-tools/core
6+
7+
# Copy all files from the core subdirectory into the container
8+
COPY ./core/* /qlik-py-tools/core/
9+
10+
# Make ports 80 and 50055 available to the world outside this container
11+
EXPOSE 80 50055
12+
13+
# Run __main__.py when the container launches
14+
CMD ["python", "__main__.py"]

0 commit comments

Comments
 (0)