{"action":"created","issue":{"url":"https://api.github.com/repos/datacats/datacats/issues/334","labels_url":"https://api.github.com/repos/datacats/datacats/issues/334/labels{/name}","comments_url":"https://api.github.com/repos/datacats/datacats/issues/334/comments","events_url":"https://api.github.com/repos/datacats/datacats/issues/334/events","html_url":"https://github.com/datacats/datacats/issues/334","id":109030979,"number":334,"title":"Vanilla datacats environment fails to start with AttributeError","user":{"login":"florianm","id":762815,"avatar_url":"https://avatars.githubusercontent.com/u/762815?v=3","gravatar_id":"","url":"https://api.github.com/users/florianm","html_url":"https://github.com/florianm","followers_url":"https://api.github.com/users/florianm/followers","following_url":"https://api.github.com/users/florianm/following{/other_user}","gists_url":"https://api.github.com/users/florianm/gists{/gist_id}","starred_url":"https://api.github.com/users/florianm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianm/subscriptions","organizations_url":"https://api.github.com/users/florianm/orgs","repos_url":"https://api.github.com/users/florianm/repos","events_url":"https://api.github.com/users/florianm/events{/privacy}","received_events_url":"https://api.github.com/users/florianm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-09-30T07:20:41Z","updated_at":"2015-10-06T23:47:05Z","closed_at":null,"body":"Ok, here's a tricky one. My system should be up to date with:\r\n* apt-get upgraded Ubuntu 14.04 VM\r\n* fresh datacats master install (1.1.0)\r\n* fresh docker install (updated) via `wget -qO- https://get.docker.com/ | sh`\r\n* fresh datacats images via `datacats pull -a`\r\n\r\nI've got a handful of existing datacats environments running on that VM which all work fine and can be stopped/restarted. However, creating a new datacats environment, or running `datacats install` inside an existing one will result in a crashing ckan instance.\r\n\r\nLive example: \r\n`datacats create --ckan latest --site-url http://minesweeper.alpha.data.wa.gov.au minesweeper PORT`\r\ncreates http://minesweeper.alpha.data.wa.gov.au/ which initially works fine, but as soon as I login (using the admin account created during `datacats create`), it crashes with error trace:\r\n\r\n```\r\nDebug at: http://minesweeper.alpha.data.wa.gov.au/_debug/view/1443596557\r\n2015-09-30 07:04:27,533 INFO  [ckan.lib.base]  /images/icons/ckan.ico render time 0.004 seconds\r\nTraceback (most recent call last):\r\n  ...\r\nFile \"/project/ckan/ckan/model/activity.py\", line 298, in dashboard_activity_list\r\n    q = _dashboard_activity_query(user_id, limit + offset)\r\n  File \"/project/ckan/ckan/model/activity.py\", line 283, in _dashboard_activity_query\r\n    q1 = _user_activity_query(user_id, limit)\r\n  File \"/project/ckan/ckan/model/activity.py\", line 126, in _user_activity_query\r\n    return _activities_union_all(q1, q2)\r\n  File \"/project/ckan/ckan/model/activity.py\", line 96, in _activities_union_all\r\n    return model.Session.query(model.Activity).select_entity_from(\r\nAttributeError: 'Query' object has no attribute 'select_entity_from'\r\n```\r\nHitting /user/logout restores a working CKAN again.\r\n\r\nThis happens with both `--ckan latest` and `--ckan 2.4`.\r\n\r\nIf I run `datacats install` in an existing (previously working) environment, datapusher will install https://github.com/okfn/ckan-service-provider/archive/stable.zip which in turn pulls in SQLAlchemy==0.7.8 which in turn collides with latest (vanilla) ckanext-spatial's philosophy on GeoAlchemy2. Strangely, the relevant test in ckanext-spatial which tests for GeoAlchemy versions has been around since well before I ran my last (working) ckan installs.\r\n\r\nWhere could I have gone wrong? To my knowledge, my datacats installation, docker images, docker installation, and the datacats environment \"minesweeper\" are vanilla and up to date. \r\nAny pointers welcome!\r\n\r\nupdate: \r\n```\r\n(ckan)ubuntu@ip-172-31-22-195:/var/projects/ckan/boom$ datacats shell\r\nError response from daemon: Cannot start container 5d212a950796f3394e943c6935ec4d5c26097aee1d05298fc51fd26a0c8b270d: Cannot link to a non running container: /datacats_datapusher_boom_primary AS /gloomy_poincare/datapusher\r\n```\r\n\r\n`docker ps` confirms that datapusher only runs for the (working) site. So why is datapusher not running on my end? Shouldn't a `datacats reload` also restart the datapusher container?"},"comment":{"url":"https://api.github.com/repos/datacats/datacats/issues/comments/146036033","html_url":"https://github.com/datacats/datacats/issues/334#issuecomment-146036033","issue_url":"https://api.github.com/repos/datacats/datacats/issues/334","id":146036033,"user":{"login":"florianm","id":762815,"avatar_url":"https://avatars.githubusercontent.com/u/762815?v=3","gravatar_id":"","url":"https://api.github.com/users/florianm","html_url":"https://github.com/florianm","followers_url":"https://api.github.com/users/florianm/followers","following_url":"https://api.github.com/users/florianm/following{/other_user}","gists_url":"https://api.github.com/users/florianm/gists{/gist_id}","starred_url":"https://api.github.com/users/florianm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianm/subscriptions","organizations_url":"https://api.github.com/users/florianm/orgs","repos_url":"https://api.github.com/users/florianm/repos","events_url":"https://api.github.com/users/florianm/events{/privacy}","received_events_url":"https://api.github.com/users/florianm/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T23:47:05Z","updated_at":"2015-10-06T23:47:05Z","body":"Morning everyone, further to the steps above where I tried to setup a datacats ckan _with_ working datapusher, I am getting stuck when I need ckanext-spatial to `datacats paster spatial initdb`, with the command blocking from not finding a running datapusher. This means I'll run into trouble should I populate the ckan with spatially referenced data. I'll retry now above with --no-datapusher.\r\n\r\n@wardi @deniszgonjanin @JackMc any pointers re datapusher or updated images/Dockerfiles welcome!"}}