Closed netzinside closed 5 years ago
I'm seeing the same error with any slicer sql command. So far have not figured out any way around it. Here's the command :
slicer sql denormalize
Error: config should be a ConfigParser instance, but is <type 'unicode'> Anyone know how to get this to work? BTW slicer serve works fine.
Same with Python 2.7.9:
cubes.errors.ConfigurationError: config should be a ConfigParser instance, but is <type 'str'>
We need a ConfigParser instance, so I add code
from cubes.compat import ConfigParser
settings = ConfigParser()
settings.read("slicer.ini")
and change parameter config
app.register_blueprint(slicer, url_prefix="/slicer", config="slicer.ini")
to be
app.register_blueprint(slicer, url_prefix="/slicer", config=settings)
hope it help.
Same as #456 #435 #445 and pull request #459 should fix it.
Closing as per @christian-proust coment. Should be fixed in master.
Hi,
just wanted to take a look at the examples provided with the master branch (In this case I tried to test dimension_browser ) but as soon as I'm executing the command python application.py following error occurs:
cubes_python\cubes-master\cubes-master\examples\dimension_browser>python application.py Traceback (most recent call last): File "application.py", line 105, in <module> app.register_blueprint(slicer, url_prefix="/slicer", config="slicer.ini") File "C:\Python34\lib\site-packages\flask\app.py", line 64, in wrapper_func return f(self, *args, **kwargs) File "C:\Python34\lib\site-packages\flask\app.py", line 951, in register_blueprint blueprint.register(self, options, first_registration) File "C:\Python34\lib\site-packages\flask\blueprints.py", line 154, in register deferred(state) File "C:\Python34\lib\site-packages\flask\blueprints.py", line 129, in wrapper func(state) File "C:\Python34\lib\site-packages\cubes\server\blueprint.py", line 103, in initialize_slicer current_app.cubes_workspace = Workspace(config, **_options) File "C:\Python34\lib\site-packages\cubes\workspace.py", line 84, in __init__ " but is %r" % (type(config),)) cubes.errors.ConfigurationError: config should be a ConfigParser instance, but is <class 'str'>
Does someone faced the same problem? All tested within python 3.4.2 and 3.6.1.
Thanks