Setting up an own instance of openpoiservice


#1

Hello there,

I’m trying to set up an own instance of OpenPOIService as a docker container following these instructions:

At this point I get stuck:

docker exec -it container_name /ops_venv/bin/python manage.py import_data

I executed:

sudo docker exec -it <container_id> /ops_venv/bin/python manage.py import-data

…and get this message:

Found directory: /deploy/app/osm
INFO:main:Starting to import OSM data…[’/deploy/app/osm/bremen-latest.osm.pbf’, ‘/deploy/app/osm/bremen-tests.osm.pbf’]
INFO:openpoiservice.server.db_import.parser:Starting to read /deploy/app/osm/bremen-latest.osm.pbf
INFO:openpoiservice.server.db_import.parser:Parsing and importing nodes…
Traceback (most recent call last):
File “manage.py”, line 60, in
cli()
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/flask/cli.py”, line 380, in main
return AppGroup.main(self, *args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/flask/cli.py”, line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “manage.py”, line 56, in import_data
parser.run_import(osm_files)
File “/deploy/app/openpoiservice/server/utils/decorators.py”, line 105, in timed
result = method(*args, **kw)
File “/deploy/app/openpoiservice/server/db_import/parser.py”, line 76, in run_import
parse_file(osm_file)
File “/deploy/app/openpoiservice/server/utils/decorators.py”, line 51, in wrapper
raise ex_type(message)
KeyError: ‘(‘concurrent_workers’,) (in subprocess)\n File “/deploy/app/openpoiservice/server/utils/decorators.py”, line 26, in process_func\n ret = func(*args, **kwargs)\n File “/deploy/app/openpoiservice/server/db_import/parser.py”, line 68, in parse_file\n parse_import(osm_file)\n File “/deploy/app/openpoiservice/server/db_import/parser.py”, line 25, in parse_import\n nodes = OSMParser(concurrency=ops_settings[‘concurrent_workers’], nodes_callback=osm_importer.parse_nodes)\n’

Any idea what I could do?

Tanky in advance for your support,

Kathrin


#2

Greetings @Katzentier - sorry, I have to add this to the documentation: could you please add a key concurrent_workers to ops_settings.yml and set it to 1 and retry?


#3

The key concurrent_workers is set to 4 at the moment, changed it to 1.

Now, the error message changed to:

File “manage.py”, line 60, in
cli()
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/flask/cli.py”, line 380, in main
return AppGroup.main(self, *args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/flask/cli.py”, line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File “/ops_venv/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “manage.py”, line 56, in import_data
parser.run_import(osm_files)
File “/deploy/app/openpoiservice/server/utils/decorators.py”, line 105, in timed
result = method(*args, **kw)
File “/deploy/app/openpoiservice/server/db_import/parser.py”, line 76, in run_import
parse_file(osm_file)
File “/deploy/app/openpoiservice/server/utils/decorators.py”, line 51, in wrapper
raise ex_type(message)
TypeError: init() missing 2 required positional arguments: ‘params’ and ‘orig’


#4

Any idea about the 2nd error message?


#5

@Katzentier sorry, I missed this message. I am not sure what is going on here, you are trying to import data now, right?


#6

Right, I’m trying to import OSM data.


#7

I’m trying to reproduce this or to actually find what’s not working here, so far nothing. I think you’ll have to dig a little deeper yourself. Sorry that I can’t help as of now.