{"url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/531","repository_url":"https://api.github.com/repos/open-cogsci/OpenSesame","labels_url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/531/labels{/name}","comments_url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/531/comments","events_url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/531/events","html_url":"https://github.com/open-cogsci/OpenSesame/issues/531","id":222458019,"node_id":"MDU6SXNzdWUyMjI0NTgwMTk=","number":531,"title":"Using `length` as a variable name in a loop causes crash","user":{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":425538403,"node_id":"MDU6TGFiZWw0MjU1Mzg0MDM=","url":"https://api.github.com/repos/open-cogsci/OpenSesame/labels/Bug","name":"Bug","color":"FF9800","default":false,"description":null}],"state":"closed","locked":false,"assignees":[{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/open-cogsci/OpenSesame/milestones/32","html_url":"https://github.com/open-cogsci/OpenSesame/milestone/32","labels_url":"https://api.github.com/repos/open-cogsci/OpenSesame/milestones/32/labels","id":2311457,"node_id":"MDk6TWlsZXN0b25lMjMxMTQ1Nw==","number":32,"title":"3.1.7 Jazzy James (7th maintenance release)","description":"","creator":{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false},"open_issues":0,"closed_issues":23,"state":"closed","created_at":"2017-02-09T09:48:25Z","updated_at":"2017-07-06T10:20:26Z","due_on":"2017-06-30T00:00:00Z","closed_at":"2017-07-06T10:19:20Z"},"comments":0,"created_at":"2017-04-18T15:37:01Z","updated_at":"2017-07-06T10:20:08Z","closed_at":"2017-07-06T10:20:08Z","assignee":{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false},"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"When using `length` as a variable name in a `loop` item, the following crash occurs:\r\n\r\n~~~\r\nFile \"C:\\Program Files (x86)\\OpenSesame\\lib\\site-packages\\libqtopensesame\\runners\\base_runner.py\", line 221, in init_experiment\r\n    logfile=logfile)\r\n  File \"C:\\Program Files (x86)\\OpenSesame\\lib\\site-packages\\libopensesame\\experiment.py\", line 140, in __init__\r\n    item.item.__init__(self, name, self, string)\r\n  File \"C:\\Program Files (x86)\\OpenSesame\\lib\\site-packages\\libopensesame\\item.py\", line 67, in __init__\r\n    self.from_string(string)\r\n  File \"C:\\Program Files (x86)\\OpenSesame\\lib\\site-packages\\libopensesame\\experiment.py\", line 345, in from_string\r\n    self.items.new(item_type, item_name, def_str)\r\n  File \"C:\\Program Files (x86)\\OpenSesame\\lib\\site-packages\\libopensesame\\item_store.py\", line 174, in new\r\n    item = item_class(name, self.experiment, script)\r\n  File \"C:\\Program Files (x86)\\OpenSesame\\lib\\site-packages\\libopensesame\\item.py\", line 67, in __init__\r\n    self.from_string(string)\r\n  File \"C:\\Program Files (x86)\\OpenSesame\\lib\\site-packages\\libopensesame\\loop.py\", line 91, in from_string\r\n    self.dm[var] = u''\r\n  File \"build/bdist.linux-x86_64/egg/datamatrix/_datamatrix/_datamatrix.py\", line 494, in __setitem__\r\n    self.__setattr__(name, value)\r\n  File \"build/bdist.linux-x86_64/egg/datamatrix/_datamatrix/_datamatrix.py\", line 441, in __setattr__\r\n    self._setlength(value)\r\n  File \"build/bdist.linux-x86_64/egg/datamatrix/_datamatrix/_datamatrix.py\", line 221, in _setlength\r\n    rowid = Index([i+startid for i in range(value-len(self))])\r\nTypeError: unsupported operand type(s) for -: 'unicode' and 'int'\r\n~~~\r\n\r\nThe problem is that DataMatrix interprets this as the actual length (i.e. number of rows), and not a column name. The solution is to be determined.","closed_by":{"login":"smathot","id":594936,"node_id":"MDQ6VXNlcjU5NDkzNg==","avatar_url":"https://avatars.githubusercontent.com/u/594936?v=4","gravatar_id":"","url":"https://api.github.com/users/smathot","html_url":"https://github.com/smathot","followers_url":"https://api.github.com/users/smathot/followers","following_url":"https://api.github.com/users/smathot/following{/other_user}","gists_url":"https://api.github.com/users/smathot/gists{/gist_id}","starred_url":"https://api.github.com/users/smathot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smathot/subscriptions","organizations_url":"https://api.github.com/users/smathot/orgs","repos_url":"https://api.github.com/users/smathot/repos","events_url":"https://api.github.com/users/smathot/events{/privacy}","received_events_url":"https://api.github.com/users/smathot/received_events","type":"User","user_view_type":"public","site_admin":false},"reactions":{"url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/531/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/531/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null}