Docker Community Forums

Share and learn in the Docker community.

Unable to run test script inside a Docker container, custom Error message : TypeError: 'NotImplementedType' object is not callable

I’m trying to dockerize a python -selenium based project where scripts uses custom class lib folders to run. When I try to run the script by providing all the required arguments (URL, Username, Password and browser parameters), I see a Type error as follows:

ERROR: test_log_in (main.LogInDscvr)

Traceback (most recent call last):
File “/app/uits/lib/”, line 129, in setUp
self.client = self.new_client(user_cfg=self.USER_CFG, browser_cfg=self.BROWSER_CFG)
File “/app/uits/lib/”, line 125, in new_client
return KeymasterClient.from_config(user_cfg=user_cfg, browser_cfg=browser_cfg)
File “/app/uits/lib/clients/”, line 31, in from_config
return cls(user_cfg=user_cfg, browser_cfg=browser_cfg, driver=driver)
File “/app/uits/lib/clients/”, line 14, in init
super(DscvrClient, self).init(params=user_cfg, config=browser_cfg, driver=driver)
File “/app/uits/lib/clients/”, line 51, in init
raise NotImplemented(“don’t know where to save data”)
TypeError: ‘NotImplementedType’ object is not callable

Ran 1 test in 0.001s

FAILED (errors=1)

Please help me find a solution with what I’m doing wrong. The project structure looks like this:

Test script: dscvr_log_in_local
import unittest
from uits.lib.util_local import LocalTemplate, TestStep
from uits.lib.test_utils import TestUtils

Docker file:

FROM python:3.7


# upgrade pip
RUN pip install --upgrade pip setuptools

COPY requirements.txt requirements.txt
COPY database database
COPY drivers drivers
COPY tests tests
COPY uits uits

#install required additional dependencies
RUN pip install -r requirements.txt

# install selenium
RUN pip install selenium

# set display port to avoid crash

# install chromedriver
RUN apt-get install -yqq unzip
RUN wget -O /tmp/ -sS
RUN unzip /tmp/ chromedriver -d /usr/local/bin/

RUN chmod +x

#ENTRYPOINT [“bash”, “/app/”]