{"url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/456","repository_url":"https://api.github.com/repos/open-cogsci/OpenSesame","labels_url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/456/labels{/name}","comments_url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/456/comments","events_url":"https://api.github.com/repos/open-cogsci/OpenSesame/issues/456/events","html_url":"https://github.com/open-cogsci/OpenSesame/issues/456","id":178835020,"node_id":"MDU6SXNzdWUxNzg4MzUwMjA=","number":456,"title":"canvas.clear()   with color argument causes a crash","user":{"login":"eort","id":8819465,"node_id":"MDQ6VXNlcjg4MTk0NjU=","avatar_url":"https://avatars.githubusercontent.com/u/8819465?v=4","gravatar_id":"","url":"https://api.github.com/users/eort","html_url":"https://github.com/eort","followers_url":"https://api.github.com/users/eort/followers","following_url":"https://api.github.com/users/eort/following{/other_user}","gists_url":"https://api.github.com/users/eort/gists{/gist_id}","starred_url":"https://api.github.com/users/eort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eort/subscriptions","organizations_url":"https://api.github.com/users/eort/orgs","repos_url":"https://api.github.com/users/eort/repos","events_url":"https://api.github.com/users/eort/events{/privacy}","received_events_url":"https://api.github.com/users/eort/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":"eort","id":8819465,"node_id":"MDQ6VXNlcjg4MTk0NjU=","avatar_url":"https://avatars.githubusercontent.com/u/8819465?v=4","gravatar_id":"","url":"https://api.github.com/users/eort","html_url":"https://github.com/eort","followers_url":"https://api.github.com/users/eort/followers","following_url":"https://api.github.com/users/eort/following{/other_user}","gists_url":"https://api.github.com/users/eort/gists{/gist_id}","starred_url":"https://api.github.com/users/eort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eort/subscriptions","organizations_url":"https://api.github.com/users/eort/orgs","repos_url":"https://api.github.com/users/eort/repos","events_url":"https://api.github.com/users/eort/events{/privacy}","received_events_url":"https://api.github.com/users/eort/received_events","type":"User","user_view_type":"public","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/open-cogsci/OpenSesame/milestones/28","html_url":"https://github.com/open-cogsci/OpenSesame/milestone/28","labels_url":"https://api.github.com/repos/open-cogsci/OpenSesame/milestones/28/labels","id":1938526,"node_id":"MDk6TWlsZXN0b25lMTkzODUyNg==","number":28,"title":"3.1.3 Jazzy James (third 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":21,"state":"closed","created_at":"2016-08-12T08:07:30Z","updated_at":"2016-10-20T09:20:07Z","due_on":"2016-09-30T00:00:00Z","closed_at":"2016-10-20T09:20:07Z"},"comments":3,"created_at":"2016-09-23T09:58:36Z","updated_at":"2016-10-07T10:05:09Z","closed_at":"2016-10-07T10:05:09Z","assignee":{"login":"eort","id":8819465,"node_id":"MDQ6VXNlcjg4MTk0NjU=","avatar_url":"https://avatars.githubusercontent.com/u/8819465?v=4","gravatar_id":"","url":"https://api.github.com/users/eort","html_url":"https://github.com/eort","followers_url":"https://api.github.com/users/eort/followers","following_url":"https://api.github.com/users/eort/following{/other_user}","gists_url":"https://api.github.com/users/eort/gists{/gist_id}","starred_url":"https://api.github.com/users/eort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eort/subscriptions","organizations_url":"https://api.github.com/users/eort/orgs","repos_url":"https://api.github.com/users/eort/repos","events_url":"https://api.github.com/users/eort/events{/privacy}","received_events_url":"https://api.github.com/users/eort/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":"Hi, \n\nWhile I was looking for examples how to raise warnings properly, I realized that the canvas.clear() function has a color argument, which, if used, causes a crash that is not caught in an exception. \nFirst, the variable `cfg` is not defined. Second, if it was and indeed contained `u'color'`, `warnings.warn` causes a crash, because this module hasn't been imported yet at that point.\nI'm not sure, what exactly would be the desired behaviour. Once you tell me, I could try to also fix that. \n\n``` .python\n    def clear(self, color=None):\n        if color is not None:\n            if u'color' in cfg:\n                warnings.warn(u'color is a deprecated style argument for '\n                    'canvas.clear(). Use background_color instead.',\n                    DeprecationWarning)\n            self.background_color = color\n        self.stim_list = []\n        self.prepare()\n\n```\n\nBest, \n\nEduard\n","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/456/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/456/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null}