{"action":"created","issue":{"url":"https://api.github.com/repos/camptocamp/c2cgeoportal/issues/2723","repository_url":"https://api.github.com/repos/camptocamp/c2cgeoportal","labels_url":"https://api.github.com/repos/camptocamp/c2cgeoportal/issues/2723/labels{/name}","comments_url":"https://api.github.com/repos/camptocamp/c2cgeoportal/issues/2723/comments","events_url":"https://api.github.com/repos/camptocamp/c2cgeoportal/issues/2723/events","html_url":"https://github.com/camptocamp/c2cgeoportal/issues/2723","id":196084669,"number":2723,"title":"Error in step 2 upgrading to 2.1.0rc4 ","user":{"login":"svavoi","id":5998978,"avatar_url":"https://avatars.githubusercontent.com/u/5998978?v=3","gravatar_id":"","url":"https://api.github.com/users/svavoi","html_url":"https://github.com/svavoi","followers_url":"https://api.github.com/users/svavoi/followers","following_url":"https://api.github.com/users/svavoi/following{/other_user}","gists_url":"https://api.github.com/users/svavoi/gists{/gist_id}","starred_url":"https://api.github.com/users/svavoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svavoi/subscriptions","organizations_url":"https://api.github.com/users/svavoi/orgs","repos_url":"https://api.github.com/users/svavoi/repos","events_url":"https://api.github.com/users/svavoi/events{/privacy}","received_events_url":"https://api.github.com/users/svavoi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/camptocamp/c2cgeoportal/milestones/36","html_url":"https://github.com/camptocamp/c2cgeoportal/milestone/36","labels_url":"https://api.github.com/repos/camptocamp/c2cgeoportal/milestones/36/labels","id":1330997,"number":36,"title":"2.1","description":"","creator":{"login":"sbrunner","id":353872,"avatar_url":"https://avatars.githubusercontent.com/u/353872?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrunner","html_url":"https://github.com/sbrunner","followers_url":"https://api.github.com/users/sbrunner/followers","following_url":"https://api.github.com/users/sbrunner/following{/other_user}","gists_url":"https://api.github.com/users/sbrunner/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrunner/subscriptions","organizations_url":"https://api.github.com/users/sbrunner/orgs","repos_url":"https://api.github.com/users/sbrunner/repos","events_url":"https://api.github.com/users/sbrunner/events{/privacy}","received_events_url":"https://api.github.com/users/sbrunner/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":384,"state":"open","created_at":"2015-09-30T12:23:30Z","updated_at":"2016-12-16T15:45:38Z","due_on":"2016-05-24T07:00:00Z","closed_at":null},"comments":7,"created_at":"2016-12-16T15:30:10Z","updated_at":"2016-12-21T11:09:20Z","closed_at":null,"body":"* GitHub URL: https://github.com/camptocamp/baselstadt_mapbs/tree/GMF2x\r\n\r\nRunning command: ` make -f svavoi.mk upgrade2 `\r\n\r\nResult:\r\n\r\n```\r\nsvavoi@bvdgdi-svdmbap3:~/mapbs$ make -f svavoi.mk upgrade2\r\n.build/venv/bin/c2ctool upgrade  svavoi.mk --step 2\r\nmake[1]: Entering directory '/home/svavoi/mapbs'\r\n.build/venv/bin/pot-create --config lingua-client.cfg --output mapbs/locale/mapbs-client.pot mapbs/templates/desktop.html mapbs/templates/mobile.html mapbs/templates/api/apihelp.html mapbs/templates/api/xapihelp.html mapbs/templates/match.html mapbs/templates/routing.html mapbs/templates/edit.html mapbs/templates/metadata.html mapbs/static-ngeo/js/mobile.js mapbs/static-ngeo/js/mapbsmodule.js mapbs/static-ngeo/js/desktop.js   mapbs/static-ngeo/components/contextualdata/contextualdata.html .build/config.yaml development.ini print/print-apps/mapbs/config.yaml\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 126, in __call__\r\n    exit()\r\n  File \"/home/svavoi/mapbs/.build/venv/lib/python2.7/site.py\", line 403, in __call__\r\n    raise SystemExit(code)\r\nSystemExit: None\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 126, in __call__\r\n    exit()\r\n  File \"/home/svavoi/mapbs/.build/venv/lib/python2.7/site.py\", line 403, in __call__\r\n    raise SystemExit(code)\r\nSystemExit: None\r\n\r\nError parsing ./mapbs/templates/mobile.html at line 6 column 74\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 126, in __call__\r\n    exit()\r\n  File \"/home/svavoi/mapbs/.build/venv/lib/python2.7/site.py\", line 403, in __call__\r\n    raise SystemExit(code)\r\nSystemExit: None\r\n\r\nError parsing ./mapbs/templates/api/apihelp.html at line 15 column 45\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 126, in __call__\r\n    exit()\r\n  File \"/home/svavoi/mapbs/.build/venv/lib/python2.7/site.py\", line 403, in __call__\r\n    raise SystemExit(code)\r\nSystemExit: None\r\n\r\nError parsing ./mapbs/templates/api/xapihelp.html at line 15 column 45\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 126, in __call__\r\n    exit()\r\n  File \"/home/svavoi/mapbs/.build/venv/lib/python2.7/site.py\", line 403, in __call__\r\n    raise SystemExit(code)\r\nSystemExit: None\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 126, in __call__\r\n    exit()\r\n  File \"/home/svavoi/mapbs/.build/venv/lib/python2.7/site.py\", line 403, in __call__\r\n    raise SystemExit(code)\r\nSystemExit: None\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 126, in __call__\r\n    exit()\r\n  File \"/home/svavoi/mapbs/.build/venv/lib/python2.7/site.py\", line 403, in __call__\r\n    raise SystemExit(code)\r\nSystemExit: None\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 124, in __call__\r\n    template_adapter=MyTemplate\r\n  File \"/home/svavoi/mapbs/.build/venv/bin/bottle.py\", line 3609, in template\r\n    return TEMPLATES[tplid].render(kwargs)\r\n  File \"/home/svavoi/mapbs/.build/venv/bin/bottle.py\", line 3280, in render\r\n    return self.tpl.render(**_defaults)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/mako/template.py\", line 462, in render\r\n    return runtime._render(self, self.callable_, args, data)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/mako/runtime.py\", line 838, in _render\r\n    **_kwargs_for_callable(callable_, data))\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/mako/runtime.py\", line 873, in _render_context\r\n    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/mako/runtime.py\", line 899, in _exec_template\r\n    callable_(context, *args, **kwargs)\r\n  File \"__mapbs_templates_metadata_html\", line 24, in render_body\r\nAttributeError: 'Undefined' object has no attribute 'bezeichnung'\r\n\r\nTraceback (most recent call last):\r\n  File \".build/venv/bin/pot-create\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/lingua/extract.py\", line 330, in main\r\n    for message in extractor(real_filename, options):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 199, in __call__\r\n    self.env = bootstrap(filename)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/pyramid/paster.py\", line 131, in bootstrap\r\n    app = get_app(config_uri, options=options)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/pyramid/paster.py\", line 31, in get_app\r\n    global_conf=options)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py\", line 247, in loadapp\r\n    return loadobj(APP, uri, name=name, **kw)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py\", line 272, in loadobj\r\n    return context.create()\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py\", line 710, in create\r\n    return self.object_type.invoke(self)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py\", line 203, in invoke\r\n    app = context.app_context.create()\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py\", line 710, in create\r\n    return self.object_type.invoke(self)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py\", line 146, in invoke\r\n    return fix_call(context.object, context.global_conf, **context.local_conf)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/paste/deploy/util.py\", line 55, in fix_call\r\n    val = callable(*args, **kw)\r\n  File \"/home/svavoi/mapbs/mapbs/__init__.py\", line 66, in main\r\n    cube_engine = create_engine(settings.get('cube_connection').get('url'))\r\nAttributeError: 'NoneType' object has no attribute 'get'\r\nCONST_Makefile:701: recipe for target 'mapbs/locale/mapbs-client.pot' failed\r\nmake[1]: *** [mapbs/locale/mapbs-client.pot] Error 1\r\nmake[1]: Leaving directory '/home/svavoi/mapbs'\r\nTraceback (most recent call last):\r\n  File \".build/venv/bin/c2ctool\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/c2ctool.py\", line 98, in main\r\n    c2ctool.upgrade()\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/c2ctool.py\", line 218, in upgrade\r\n    self.step2()\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/c2ctool.py\", line 383, in step2\r\n    self.step3()\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/c2ctool.py\", line 428, in step3\r\n    self.step4()\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/c2ctool.py\", line 442, in step4\r\n    check_call([\"make\", \"-f\", self.options.file, \"build\"])\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 540, in check_call\r\n    raise CalledProcessError(retcode, cmd)\r\nsubprocess.CalledProcessError: Command '['make', '-f', 'svavoi.mk', 'build']' returned non-zero exit status 2\r\nCONST_Makefile:1248: recipe for target 'upgrade2' failed\r\nmake: *** [upgrade2] Error 1\r\n\r\n\r\n```\r\n\r\nMy assumption is that the DB connections I defined in the `__init__.py` file are not valid anymore.\r\nDo I need to define them differently for GMF 2.x?\r\nhttps://github.com/camptocamp/baselstadt_mapbs/blob/GMF2x/mapbs/__init__.py#L42-L49\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/camptocamp/c2cgeoportal/issues/comments/268496870","html_url":"https://github.com/camptocamp/c2cgeoportal/issues/2723#issuecomment-268496870","issue_url":"https://api.github.com/repos/camptocamp/c2cgeoportal/issues/2723","id":268496870,"user":{"login":"svavoi","id":5998978,"avatar_url":"https://avatars.githubusercontent.com/u/5998978?v=3","gravatar_id":"","url":"https://api.github.com/users/svavoi","html_url":"https://github.com/svavoi","followers_url":"https://api.github.com/users/svavoi/followers","following_url":"https://api.github.com/users/svavoi/following{/other_user}","gists_url":"https://api.github.com/users/svavoi/gists{/gist_id}","starred_url":"https://api.github.com/users/svavoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svavoi/subscriptions","organizations_url":"https://api.github.com/users/svavoi/orgs","repos_url":"https://api.github.com/users/svavoi/repos","events_url":"https://api.github.com/users/svavoi/events{/privacy}","received_events_url":"https://api.github.com/users/svavoi/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T11:09:20Z","updated_at":"2016-12-21T11:09:20Z","body":"Thanks! I can get now the cube_connection.\r\nBut I still have this error and some new ones:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/lib/lingua_extractor.py\", line 124, in __call__\r\n    template_adapter=MyTemplate\r\n  File \"/home/svavoi/mapbs/.build/venv/bin/bottle.py\", line 3609, in template\r\n    return TEMPLATES[tplid].render(kwargs)\r\n  File \"/home/svavoi/mapbs/.build/venv/bin/bottle.py\", line 3280, in render\r\n    return self.tpl.render(**_defaults)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/mako/template.py\", line 462, in render\r\n    return runtime._render(self, self.callable_, args, data)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/mako/runtime.py\", line 838, in _render\r\n    **_kwargs_for_callable(callable_, data))\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/mako/runtime.py\", line 873, in _render_context\r\n    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)\r\n  File \"/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/mako/runtime.py\", line 899, in _exec_template\r\n    callable_(context, *args, **kwargs)\r\n  File \"__mapbs_templates_metadata_html\", line 24, in render_body\r\nAttributeError: 'Undefined' object has no attribute 'bezeichnung'\r\nERROR: The database is probably not up to date (should be ignored when happen during the upgrade)\r\n(psycopg2.ProgrammingError) relation \"main.layer_wms\" does not exist\r\nLINE 2: ...in.layer ON main.treeitem.id = main.layer.id JOIN main.layer...\r\n                                                             ^\r\n [SQL: 'SELECT main.treeitem.type AS main_treeitem_type, main.layer_wms.id AS main_layer_wms_id, main.layer.id AS main_layer_id, main.treeitem.id AS main_treeitem_id, main.treeitem.name AS main_treeitem_name, main.treeitem.metadata_url AS main_treeitem_metadata_url, main.treeitem.description AS main_treeitem_description, main.layer.public AS main_layer_public, main.layer.geo_table AS main_layer_geo_table, main.layer.exclude_properties AS main_layer_exclude_properties, main.layer_wms.ogc_server_id AS main_layer_wms_ogc_server_id, main.layer_wms.layer AS main_layer_wms_layer, main.layer_wms.style AS main_layer_wms_style, main.layer_wms.time_mode AS main_layer_wms_time_mode, main.layer_wms.time_widget AS main_layer_wms_time_widget \\nFROM main.treeitem JOIN main.layer ON main.treeitem.id = main.layer.id JOIN main.layer_wms ON main.layer.id = main.layer_wms.id']\r\n\r\n```\r\n\r\nI defined a model using this connection in the `models.py`:\r\n```\r\ncube_engine = sqlahelper.get_engine('cube')\r\nCubeSession = orm.scoped_session(orm.sessionmaker(extension=[sqlahelper._zte]))\r\nCubeSession.configure(bind=cube_engine)\r\nCubeBase = declarative_base()\r\n\r\nclass Metadata_Datensatz_MapBS(CubeBase):\r\n    __tablename__ = \"view_metadaten_mapbs\"\r\n    __table_args__ = {\"schema\": \"ds\"}\r\n    mapbs_id = Column(Integer, primary_key=True)\r\n    bezeichnung = Column(Text)\r\n    datensatz_bez = Column(Text)\r\n...\r\n```\r\nand using it in the `metadata.py` here https://github.com/camptocamp/baselstadt_mapbs/blob/GMF2x/mapbs/views/metadata.py.\r\nIs there something I should change in the definition?\r\n"}}
{"actor":{"display_login":"svavoi"}}