{"action":"created","issue":{"url":"https://api.github.com/repos/datajoint/datajoint-matlab/issues/115","repository_url":"https://api.github.com/repos/datajoint/datajoint-matlab","labels_url":"https://api.github.com/repos/datajoint/datajoint-matlab/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/datajoint/datajoint-matlab/issues/115/comments","events_url":"https://api.github.com/repos/datajoint/datajoint-matlab/issues/115/events","html_url":"https://github.com/datajoint/datajoint-matlab/issues/115","id":301918965,"number":115,"title":"Error when creating schema and table","user":{"login":"stpierrelab","id":32579051,"avatar_url":"https://avatars0.githubusercontent.com/u/32579051?v=4","gravatar_id":"","url":"https://api.github.com/users/stpierrelab","html_url":"https://github.com/stpierrelab","followers_url":"https://api.github.com/users/stpierrelab/followers","following_url":"https://api.github.com/users/stpierrelab/following{/other_user}","gists_url":"https://api.github.com/users/stpierrelab/gists{/gist_id}","starred_url":"https://api.github.com/users/stpierrelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stpierrelab/subscriptions","organizations_url":"https://api.github.com/users/stpierrelab/orgs","repos_url":"https://api.github.com/users/stpierrelab/repos","events_url":"https://api.github.com/users/stpierrelab/events{/privacy}","received_events_url":"https://api.github.com/users/stpierrelab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-02T22:01:02Z","updated_at":"2018-03-02T22:18:18Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\nI'm setting up DataJoint on MATLAB r2017b with HeidiSQL 9.5. When I create a schema on local machine, following the tutorial, I get the following error \"The specified key is not present in this container.\", while the table is successfully created on the server. \r\nThanks in advance for resolving the issue. \r\n\r\n```\r\n>> dj.createSchema\r\nEnter database name >> test\r\ndatabase created\r\nPlease select a package folder. Opening UI...\r\n>> test.fov()\r\n\r\nans = \r\n\r\n\r\nObject test.fov\r\n\r\n\r\n<SQL>\r\nCREATE TABLE `test`.`fov` (\r\n`id` int                   NOT NULL COMMENT \"unique mouse id\",\r\n`dob` date                       NOT NULL COMMENT \"mouse date of birth\",\r\n`sex` enum('M', 'F', 'U') NOT NULL COMMENT \"sex of mouse - Male, Female, or Unknown/Unclassified\",\r\nPRIMARY KEY (`id`)\r\n) ENGINE = InnoDB, COMMENT \"fov\"\r\n</SQL>\r\n\r\nError using containers.Map/subsref\r\nThe specified key is not present in this container.\r\n\r\nError in dj.internal.Table/get.plainTableName (line 115)\r\n                self.plainTableName = self.schema.tableNames(self.className);\r\n\r\nError in dj.internal.Table/get.tableHeader (line 81)\r\n                self.tableHeader = self.schema.headers(self.plainTableName);\r\n\r\nError in dj.internal.GeneralRelvar/compile (line 659)\r\n                    header = derive(tab.tableHeader);\r\n\r\nError in dj.internal.GeneralRelvar/get.header (line 43)\r\n            header = self.compile;\r\n\r\nError in dj.internal.GeneralRelvar/disp (line 73)\r\n            hdr = self.header;\r\n```\r\n\r\nIn the fov.m\r\n```\r\n%{\r\n# fov\r\nid: int                  # unique mouse id\r\n---\r\ndob: date                      # mouse date of birth\r\nsex: enum('M', 'F', 'U')       # sex of mouse - Male, Female, or Unknown/Unclassified\r\n%}\r\n\r\nclassdef fov < dj.Manual    \r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/datajoint/datajoint-matlab/issues/comments/370069084","html_url":"https://github.com/datajoint/datajoint-matlab/issues/115#issuecomment-370069084","issue_url":"https://api.github.com/repos/datajoint/datajoint-matlab/issues/115","id":370069084,"user":{"login":"eywalker","id":3084661,"avatar_url":"https://avatars3.githubusercontent.com/u/3084661?v=4","gravatar_id":"","url":"https://api.github.com/users/eywalker","html_url":"https://github.com/eywalker","followers_url":"https://api.github.com/users/eywalker/followers","following_url":"https://api.github.com/users/eywalker/following{/other_user}","gists_url":"https://api.github.com/users/eywalker/gists{/gist_id}","starred_url":"https://api.github.com/users/eywalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eywalker/subscriptions","organizations_url":"https://api.github.com/users/eywalker/orgs","repos_url":"https://api.github.com/users/eywalker/repos","events_url":"https://api.github.com/users/eywalker/events{/privacy}","received_events_url":"https://api.github.com/users/eywalker/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T22:18:18Z","updated_at":"2018-03-02T22:18:18Z","author_association":"OWNER","body":"Hi @stpierrelab thanks for reporting this. This is caused by the fact your class name `fov` is considered to be an invalid class name under DataJoint. DataJoint expects the class name to start with a capital letter. To fix your issue quickly, rename the class file and the name of the class (in the line `classdef ...`) to `Fov` and you should be able to work with that table you created. \r\n\r\nI'll double check all the tutorials to make sure that we follow the correct conventions for the class name, and we'll improve the  check and error message during the table creation."}}
{"actor":{"display_login":"eywalker"}}