{"action":"created","issue":{"url":"https://api.github.com/repos/pyblish/pyblish-qml/issues/264","repository_url":"https://api.github.com/repos/pyblish/pyblish-qml","labels_url":"https://api.github.com/repos/pyblish/pyblish-qml/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/pyblish/pyblish-qml/issues/264/comments","events_url":"https://api.github.com/repos/pyblish/pyblish-qml/issues/264/events","html_url":"https://github.com/pyblish/pyblish-qml/issues/264","id":257362300,"number":264,"title":"SystemError: error return without exception set","user":{"login":"tokejepsen","id":1860085,"avatar_url":"https://avatars0.githubusercontent.com/u/1860085?v=4","gravatar_id":"","url":"https://api.github.com/users/tokejepsen","html_url":"https://github.com/tokejepsen","followers_url":"https://api.github.com/users/tokejepsen/followers","following_url":"https://api.github.com/users/tokejepsen/following{/other_user}","gists_url":"https://api.github.com/users/tokejepsen/gists{/gist_id}","starred_url":"https://api.github.com/users/tokejepsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokejepsen/subscriptions","organizations_url":"https://api.github.com/users/tokejepsen/orgs","repos_url":"https://api.github.com/users/tokejepsen/repos","events_url":"https://api.github.com/users/tokejepsen/events{/privacy}","received_events_url":"https://api.github.com/users/tokejepsen/received_events","type":"User","site_admin":false},"labels":[{"id":132093809,"url":"https://api.github.com/repos/pyblish/pyblish-qml/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-13T12:29:09Z","updated_at":"2017-09-14T10:42:21Z","closed_at":null,"author_association":"MEMBER","body":"**Issue**\r\n\r\nWe quite often get threading issue with pyblish-qml and Nuke with the following message:\r\n\r\n```bash\r\nTraceback (most recent call last):\r\nFile \"C:/Program Files/Nuke10.5v1/plugins\\nuke\\executeInMain.py\", line 19, in executeInMainThreadWithResult\r\nr = _nuke.RunInMainThread.result(id)\r\nSystemError: error return without exception set\r\n```\r\n\r\nThreading issues are always tough to replicate. but users seem to experience them in bulks. This error makes pyblish-qml window open and then immediately close, which makes the users try it again and again in sequence.\r\nSeems like the issue can resolve itself by waiting and/or trying multiple times.\r\n\r\nFor these reasons maybe it could be something to do with a pyblish-qml instance that does not get closed/shutdown properly?"},"comment":{"url":"https://api.github.com/repos/pyblish/pyblish-qml/issues/comments/329444368","html_url":"https://github.com/pyblish/pyblish-qml/issues/264#issuecomment-329444368","issue_url":"https://api.github.com/repos/pyblish/pyblish-qml/issues/264","id":329444368,"user":{"login":"tokejepsen","id":1860085,"avatar_url":"https://avatars0.githubusercontent.com/u/1860085?v=4","gravatar_id":"","url":"https://api.github.com/users/tokejepsen","html_url":"https://github.com/tokejepsen","followers_url":"https://api.github.com/users/tokejepsen/followers","following_url":"https://api.github.com/users/tokejepsen/following{/other_user}","gists_url":"https://api.github.com/users/tokejepsen/gists{/gist_id}","starred_url":"https://api.github.com/users/tokejepsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokejepsen/subscriptions","organizations_url":"https://api.github.com/users/tokejepsen/orgs","repos_url":"https://api.github.com/users/tokejepsen/repos","events_url":"https://api.github.com/users/tokejepsen/events{/privacy}","received_events_url":"https://api.github.com/users/tokejepsen/received_events","type":"User","site_admin":false},"created_at":"2017-09-14T10:42:21Z","updated_at":"2017-09-14T10:42:21Z","author_association":"MEMBER","body":"Further to the investigation this is the erroring method in Nuke:\r\n\r\n```python\r\n# Functions for parallel threads to run stuff that can only be\r\n# in the main Nuke thread. Formerly in nukescripts.utils\r\n\r\nimport traceback\r\nimport threading\r\nimport types\r\nimport _nuke\r\n\r\ndef executeInMainThreadWithResult( call, args = (), kwargs = {}):\r\n  \"\"\" Execute the callable 'call' with optional arguments 'args' and named arguments 'kwargs' in\r\n      Nuke's main thread and wait for the result to become available. \"\"\"\r\n  if type(args) != types.TupleType:\r\n    args = (args,)\r\n\r\n  resultEvent = threading.Event()\r\n  id = _nuke.RunInMainThread.request(call, args, kwargs, resultEvent )\r\n  resultEvent.wait()\r\n  try:\r\n    r = _nuke.RunInMainThread.result(id)\r\n  except:\r\n    traceback.print_exc()\r\n    r = None\r\n\r\n  return r\r\n```\r\n\r\nIt seems like the error comes from the try/except, where the result of running something in the main thread of Nuke produces a error that Python does not recognize.\r\nFurther to this the actual error Nuke produces looks similar to; http://pythonextensionpatterns.readthedocs.io/en/latest/exceptions.html#exception-raising, which might indicate that the problem is with Nuke internals."}}
{"actor":{"display_login":"tokejepsen"}}