Closed cwallenpoole closed 5 years ago
which version of cubes?
Master.
On Jul 24, 2017 6:02 AM, "Christian Ledermann" notifications@github.com wrote:
which version of cubes?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DataBrewery/cubes/issues/445#issuecomment-317376684, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJvdzNV4TzTRzDkeIeAgWKtDOloaQdOks5sRGvMgaJpZM4Ofxta .
I found this too (python 2.7). From the documentation it seems that this should work but hasn't been implemented
Looking at the Workspace code this is the first line of __init__
# Expect to get ConfigParser instance
if config is not None and not isinstance(config, ConfigParser):
raise ConfigurationError("config should be a ConfigParser instance,"
" but is %r" % (type(config),))
I would suggest this should be altered to check also for a string type and create a ConfigParser object using the string - i'm just starting and I'm having a bit of trouble with the correct usage there, would it be
cp = ConfigParser()
cp.read(config)
config = cp
# or is it
config = ConfigParser().read(config)
This does not work as-is but bit of a nasty hack is adding an import to ConfigParser in application.py and then modify the last lines of application.py to the below :
# Create a Slicer and register it at http://localhost:5000/slicer
config = ConfigParser()
config.read("slicer.ini")
app.register_blueprint(slicer, url_prefix="/slicer", config=config)
app.run(debug=True)
Disappointingly, even after this is started it does not appear to do anything as just get two buttons with no data so probably something more broken somewhere.
It is related to the same issue as #435: the ConfigParser
should accept either a string or a config
by using the function read_config
.
Closing as per @christian-proust comment and fix. Please reopen if the issue persists.
In Python 3.6, new virtualenv
[workspace]
results in a model not found error.