cubes icon indicating copy to clipboard operation
cubes copied to clipboard

Error getting slicer.ini config in v1.1 ('str' object has no attribute 'has_option')

Open pablolmedorado opened this issue 9 years ago • 0 comments

Two days ago I upgraded from version v.1.1alpha to the final version v.1.1.

When I tried to start the server (uwsgi + slicer), I got this error:

Traceback (most recent call last): File "/usr/local/CUBES/virtualenvs/cubes2/lib/python3.5/site-packages/cubes/server/app.py", line 13, in application = create_server(CONFIG_PATH) File "/usr/local/CUBES/virtualenvs/cubes2/lib/python3.5/site-packages/cubes/server/base.py", line 38, in create_server if config.has_option("server", "modules"): AttributeError: 'str' object has no attribute 'has_option'

I compared "cubes/server/base.py" files of both versions and I realized that in version v1.1 the "create_server" method does not get the configuration from the file in "config" path. "run_server" method does it in the line 53: config = read_slicer_config(config) https://github.com/DataBrewery/cubes/blob/v1.1/cubes/server/base.py#L53

I added the line to "create_server" method and it worked.

I hope this info will be useful for someone with the same problem.

pablolmedorado avatar Sep 15 '16 07:09 pablolmedorado