{"action":"created","issue":{"url":"https://api.github.com/repos/ganga-devs/ganga/issues/29","repository_url":"https://api.github.com/repos/ganga-devs/ganga","labels_url":"https://api.github.com/repos/ganga-devs/ganga/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/ganga-devs/ganga/issues/29/comments","events_url":"https://api.github.com/repos/ganga-devs/ganga/issues/29/events","html_url":"https://github.com/ganga-devs/ganga/issues/29","id":114311995,"number":29,"title":"load() is failing for some jobs","user":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ganga-devs/ganga/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ganga-devs/ganga/labels/Core","name":"Core","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"assignees":[{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2015-10-30T17:01:17Z","updated_at":"2016-10-27T09:57:34Z","closed_at":"2016-10-27T09:57:34Z","body":"load() function fails for multiple reasons in latest release.\r\n\r\nThis should be looked at as it's bit of a pain from a user perspective.\r\n\r\nThere is also the problem that protected attributes can't be assigned during a load. This should be addressed by not exporting protected attributes imo.\r\n\r\nRob\r\n\r\nOriginal backtrace from Chris Jones below:\r\n\r\n\r\n```python\r\nIn [51]:test=load('/usera/jonesc/s24-BcDD.udsts.txt')\r\n---------------------------------------------------------------------------\r\n<type 'exceptions.AttributeError'>        Traceback (most recent call last)\r\n\r\n/var/nwork/pclr/jonesc/output/stripping/S24-B2OC-Tests/<console> in\r\n<module>()\r\n\r\n/cvmfs/lhcb.cern.ch/lib/lhcb/GANGA/GANGA_v601r11/install/ganga/python/Ganga/GPIDev/Persistency/__init__.py\r\nin load(filename, returnList)\r\n     204         if item:\r\n     205             try:\r\n--> 206                 this_object = eval(str(item), Ganga.GPI.__dict__)\r\n     207                 objectList.append(this_object)\r\n     208             except NameError as x:\r\n\r\n/var/nwork/pclr/jonesc/output/stripping/S24-B2OC-Tests/<string> in\r\n<module>()\r\n\r\n/cvmfs/lhcb.cern.ch/lib/lhcb/GANGA/GANGA_v601r11/install/ganga/python/Ganga/GPIDev/Base/Proxy.py\r\nin _init(self, *args, **kwds)\r\n     377         for k in kwds:\r\n     378             if getattr(self, proxyRef)._schema.hasAttribute(k):\r\n--> 379                 setattr(self, k, kwds[k])\r\n     380             else:\r\n     381                 logger.warning('keyword argument in the %s\r\nconstructur ignored: %s=%s (not defined in the schema)', name, k, kwds[k])\r\n\r\n/cvmfs/lhcb.cern.ch/lib/lhcb/GANGA/GANGA_v601r11/install/ganga/python/Ganga/GPIDev/Base/Proxy.py\r\nin _setattr(self, x, v)\r\n     518             raise GangaAttributeError(\"'%s' has no attribute\r\n'%s'\" % (getattr(self, proxyRef)._name, x))\r\n     519\r\n--> 520         object.__setattr__(self, x, v)\r\n     521     helptext(_setattr, \"\"\"Set a property of %(classname)s with\r\nconsistency and safety checks.\r\n     522 Setting a [protected] or a unexisting property raises\r\nAttributeError.\"\"\")\r\n\r\n/cvmfs/lhcb.cern.ch/lib/lhcb/GANGA/GANGA_v601r11/install/ganga/python/Ganga/GPIDev/Base/Proxy.py\r\nin __set__(self, obj, val)\r\n     292                 val = makeGangaList(stripper(val))\r\n     293         else:\r\n--> 294             val = stripper(val)\r\n     295\r\n     296         # apply attribute filter to component items\r\n\r\n/cvmfs/lhcb.cern.ch/lib/lhcb/GANGA/GANGA_v601r11/install/ganga/python/Ganga/GPIDev/Base/Proxy.py\r\nin stripAttribute(v)\r\n     268                 v = getattr(v, proxyRef)\r\n     269                 logger.debug('%s property: assigned a component\r\nobject (%s used)' % (self._name, proxyRef))\r\n--> 270             return getattr(obj,\r\nproxyRef)._attribute_filter__set__(self._name, v)\r\n     271\r\n     272         # unwrap proxy\r\n\r\n/cvmfs/lhcb.cern.ch/lib/lhcb/GANGA/GANGA_v601r11/install/ganga/python/GangaDirac/Lib/Files/DiracFile.py\r\nin _attribute_filter__set__(self, name, value)\r\n     177\r\n     178             elif name == 'localDir':\r\n--> 179                 return expandfilename(value)\r\n     180\r\n     181         return value\r\n\r\n/cvmfs/lhcb.cern.ch/lib/lhcb/GANGA/GANGA_v601r11/install/ganga/python/Ganga/Utility/files.py\r\nin expandfilename(filename)\r\n      15 def expandfilename(filename):\r\n      16     \"expand a path or filename in a standard way so that it may\r\ncontain ~ and ${VAR} strings\"\r\n---> 17     return os.path.expandvars(os.path.expanduser(filename))\r\n      18\r\n      19\r\n\r\n/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_76root6/Python/2.7.9.p1/x86_64-slc6-gcc48-opt/lib/python2.7/posixpath.py\r\nin expanduser(path)\r\n     259     \"\"\"Expand ~ and ~user constructions.  If user or $HOME is\r\nunknown,\r\n     260     do nothing.\"\"\"\r\n--> 261     if not path.startswith('~'):\r\n     262         return path\r\n     263     i = path.find('/', 1)\r\n\r\n<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute\r\n'startswith'\r\n```"},"comment":{"url":"https://api.github.com/repos/ganga-devs/ganga/issues/comments/256599106","html_url":"https://github.com/ganga-devs/ganga/issues/29#issuecomment-256599106","issue_url":"https://api.github.com/repos/ganga-devs/ganga/issues/29","id":256599106,"user":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T09:57:34Z","updated_at":"2016-10-27T09:57:34Z","body":"This is now working at the cost that we don't crash when users attempt to use kwds which aren't in the schema of object construction. This is viewed more as a cost of backwards compatibility so I can close this as fixed."}}
{"actor":{"display_login":"rob-c"}}