Problem with running the deeppavlov agent

Hi all,
after a successful installation of the module, I’m trying to launch the agent running the following command according to the docs.

python -m deeppavlov_agent.run -ch http_client -p 4242 -pl pipeline_conf.json -db db_conf.json -rl -d

The response is:
run.py: error: argument -d/–debug: ignored explicit argument ‘b’

I have read the source code and I noticed that the argument -db doesn’t exists!!
This is the snippet of interested code of run.py

parser.add_argument(‘-pl’, ‘–pipeline_configs’, help=‘Pipeline config (overwrite value, defined in settings)’,
type=str, action=‘append’)
parser.add_argument(“-ch”, “–channel”, help=“run agent in telegram, cmd_client or http_client”, type=str,
choices=[‘cmd_client’, ‘http_client’, ‘telegram’], default=‘cmd_client’)
parser.add_argument(‘-p’, ‘–port’, help=‘port for http client, default 4242’, default=4242)
parser.add_argument(‘-c’, ‘–cors’, help=‘whether to add CORS middleware to http_client’,
action=‘store_true’, default=None)
parser.add_argument(‘-d’, ‘–debug’, help=‘run in debug mode’, action=‘store_true’)
parser.add_argument(‘-tl’, ‘–time_limit’, help=‘response time limit, 0 = no limit’, type=int, default=0)

So after reading run.py I’have tried to run only

python -m deeppavlov_agent.run

since all the other configs are seated by default, but now I have this error

FileNotFoundError: [Errno 2] No such file or directory: ‘db_conf.json’

I don’t know how run the service.
Thanks in advice

Hi!
You can add db_conf.json in your work directory

.
├── db_conf.json
└── pipeline_conf.json

and run by this command

python -m deeppavlov_agent.run -ch http_client -p 4242 -pl pipeline_conf.json

When you open a file with the name “filename.ext”; you are telling the open() function that your file is in the current working directory . This is called a relative path.

file = open('filename.ext') //relative path

In the above code, you are not giving the full path to a file to the open() function, just its name - a relative path. The error “FileNotFoundError: [Errno 2] No such file or directory” is telling you that there is no file of that name in the working directory. So, try using the exact, or absolute path.

file = open(r'C:\path\to\your\filename.ext') //absolute path

In the above code, all of the information needed to locate the file is contained in the path string - absolute path.

If the user does not pass the full path to the file (on Unix type systems this means a path that starts with a slash), the python file path is interpreted relatively to the current working directory. The current working directory usually is the directory in which you started the program. In order to make this work, the directory containing the python executable must be in the PATH, a so-called environment variable that contains directories that are automatically used for searching executables when you enter a command. In any case, if your Python script file and your data input file are not in the same directory, you always have to specify either a relative path between them or you have to use an absolute path for one of them.