{"action":"created","issue":{"url":"https://api.github.com/repos/hohlraum/gdsCAD/issues/34","repository_url":"https://api.github.com/repos/hohlraum/gdsCAD","labels_url":"https://api.github.com/repos/hohlraum/gdsCAD/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/hohlraum/gdsCAD/issues/34/comments","events_url":"https://api.github.com/repos/hohlraum/gdsCAD/issues/34/events","html_url":"https://github.com/hohlraum/gdsCAD/issues/34","id":88450846,"number":34,"title":"global name '_incomplete' is not defined","user":{"login":"glemi","id":5314714,"avatar_url":"https://avatars.githubusercontent.com/u/5314714?v=3","gravatar_id":"","url":"https://api.github.com/users/glemi","html_url":"https://github.com/glemi","followers_url":"https://api.github.com/users/glemi/followers","following_url":"https://api.github.com/users/glemi/following{/other_user}","gists_url":"https://api.github.com/users/glemi/gists{/gist_id}","starred_url":"https://api.github.com/users/glemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glemi/subscriptions","organizations_url":"https://api.github.com/users/glemi/orgs","repos_url":"https://api.github.com/users/glemi/repos","events_url":"https://api.github.com/users/glemi/events{/privacy}","received_events_url":"https://api.github.com/users/glemi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-15T14:57:56Z","updated_at":"2016-02-22T16:46:58Z","closed_at":null,"body":"in gdsCAD version 0.4.5, in core.py I get an error when using GdsImport on a particular .gds file.\r\n\r\n    NameError: global name '_incomplete' is not defined\r\n\r\nhere is the code where the error occurrs (around line 2174):\r\n\r\n````python\r\ndef _create_reference(**kwargs):\r\n    kwargs['origin'] = kwargs.pop('xy')\r\n    ref = CellReference(**kwargs)\r\n    if not isinstance(ref.ref_cell, Cell):\r\n        _incomplete.append(ref)\r\n    return ref\r\n````\r\n\r\n`_incomplete` is initialized in `GdsImport` as an empty list `[]` but it's outside the scope of where `_create_reference` is defined. It is also used in `_create_array`, and would probably generate the same error when executed. \r\n\r\nI have tried out-commenting the `if` block in `_create_reference` but then I get errors later on because `ref.ref_cell` is a string instead of a `Cell` object. \r\n\r\nedit:\r\nI fixed this to some extent by declaring _incomplete as a global variable in the core.py module. However now when GdsImprt tries to resolve the references, it looks up the string value of `ref.ref_cell` in `cell_dict`, which again is not defined (around line 2041). "},"comment":{"url":"https://api.github.com/repos/hohlraum/gdsCAD/issues/comments/187260220","html_url":"https://github.com/hohlraum/gdsCAD/issues/34#issuecomment-187260220","issue_url":"https://api.github.com/repos/hohlraum/gdsCAD/issues/34","id":187260220,"user":{"login":"Tokin256","id":17412004,"avatar_url":"https://avatars.githubusercontent.com/u/17412004?v=3","gravatar_id":"","url":"https://api.github.com/users/Tokin256","html_url":"https://github.com/Tokin256","followers_url":"https://api.github.com/users/Tokin256/followers","following_url":"https://api.github.com/users/Tokin256/following{/other_user}","gists_url":"https://api.github.com/users/Tokin256/gists{/gist_id}","starred_url":"https://api.github.com/users/Tokin256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tokin256/subscriptions","organizations_url":"https://api.github.com/users/Tokin256/orgs","repos_url":"https://api.github.com/users/Tokin256/repos","events_url":"https://api.github.com/users/Tokin256/events{/privacy}","received_events_url":"https://api.github.com/users/Tokin256/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T16:46:57Z","updated_at":"2016-02-22T16:46:57Z","body":"Hi @mabl!\r\nI suffered from the same problem. Your branch seems to be working!\r\nThanks!"}}