{"action":"closed","issue":{"url":"https://api.github.com/repos/opalytics/opalytics-ticdat/issues/190","repository_url":"https://api.github.com/repos/opalytics/opalytics-ticdat","labels_url":"https://api.github.com/repos/opalytics/opalytics-ticdat/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/opalytics/opalytics-ticdat/issues/190/comments","events_url":"https://api.github.com/repos/opalytics/opalytics-ticdat/issues/190/events","html_url":"https://github.com/opalytics/opalytics-ticdat/issues/190","id":315224430,"number":190,"title":"set_ampl_data give better error message for bad table name","user":{"login":"pjcpjc","id":5625059,"avatar_url":"https://avatars2.githubusercontent.com/u/5625059?v=4","gravatar_id":"","url":"https://api.github.com/users/pjcpjc","html_url":"https://github.com/pjcpjc","followers_url":"https://api.github.com/users/pjcpjc/followers","following_url":"https://api.github.com/users/pjcpjc/following{/other_user}","gists_url":"https://api.github.com/users/pjcpjc/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcpjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcpjc/subscriptions","organizations_url":"https://api.github.com/users/pjcpjc/orgs","repos_url":"https://api.github.com/users/pjcpjc/repos","events_url":"https://api.github.com/users/pjcpjc/events{/privacy}","received_events_url":"https://api.github.com/users/pjcpjc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"pjcpjc","id":5625059,"avatar_url":"https://avatars2.githubusercontent.com/u/5625059?v=4","gravatar_id":"","url":"https://api.github.com/users/pjcpjc","html_url":"https://github.com/pjcpjc","followers_url":"https://api.github.com/users/pjcpjc/followers","following_url":"https://api.github.com/users/pjcpjc/following{/other_user}","gists_url":"https://api.github.com/users/pjcpjc/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcpjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcpjc/subscriptions","organizations_url":"https://api.github.com/users/pjcpjc/orgs","repos_url":"https://api.github.com/users/pjcpjc/repos","events_url":"https://api.github.com/users/pjcpjc/events{/privacy}","received_events_url":"https://api.github.com/users/pjcpjc/received_events","type":"User","site_admin":false},"assignees":[{"login":"pjcpjc","id":5625059,"avatar_url":"https://avatars2.githubusercontent.com/u/5625059?v=4","gravatar_id":"","url":"https://api.github.com/users/pjcpjc","html_url":"https://github.com/pjcpjc","followers_url":"https://api.github.com/users/pjcpjc/followers","following_url":"https://api.github.com/users/pjcpjc/following{/other_user}","gists_url":"https://api.github.com/users/pjcpjc/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcpjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcpjc/subscriptions","organizations_url":"https://api.github.com/users/pjcpjc/orgs","repos_url":"https://api.github.com/users/pjcpjc/repos","events_url":"https://api.github.com/users/pjcpjc/events{/privacy}","received_events_url":"https://api.github.com/users/pjcpjc/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-04-17T20:32:47Z","updated_at":"2018-04-18T02:39:19Z","closed_at":"2018-04-18T02:39:19Z","author_association":"CONTRIBUTOR","body":"If you fail to remove a table from the `dat` object that should be removed when calling `copy_to_ampl` then you get a cryptic error message when calling `set_ampl_data`.\r\n\r\nSomething like \r\n\r\n```\r\nRuntimeError: file -\r\nline 1 offset 20\r\nValue is not a subscripted param\r\n```\r\n\r\nWhere `Value` is a field name from the table that fails to match up. The `ticdat/ticdatfactory.py` code here\r\n\r\n```\r\n   1039         for t in set(self.all_tables).intersection(dir(tic_dat)):\r\n   1040             ampl.setData(getattr(tic_dat, t), *([table_to_set_name[t]]\r\n-> 1041                                                 if t in table_to_set_name else []))\r\n```\r\n\r\nshould capture that exception and then raise an exception with `t` (the table name) in it somehow."}}
{"actor":{"display_login":"pjcpjc"}}