{"action":"created","issue":{"url":"https://api.github.com/repos/h5py/h5py/issues/599","labels_url":"https://api.github.com/repos/h5py/h5py/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/h5py/h5py/issues/599/comments","events_url":"https://api.github.com/repos/h5py/h5py/issues/599/events","html_url":"https://github.com/h5py/h5py/issues/599","id":96366751,"number":599,"title":"Non string attributes broken in latest master (after #597)","user":{"login":"gpwright","id":5623282,"avatar_url":"https://avatars.githubusercontent.com/u/5623282?v=3","gravatar_id":"","url":"https://api.github.com/users/gpwright","html_url":"https://github.com/gpwright","followers_url":"https://api.github.com/users/gpwright/followers","following_url":"https://api.github.com/users/gpwright/following{/other_user}","gists_url":"https://api.github.com/users/gpwright/gists{/gist_id}","starred_url":"https://api.github.com/users/gpwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpwright/subscriptions","organizations_url":"https://api.github.com/users/gpwright/orgs","repos_url":"https://api.github.com/users/gpwright/repos","events_url":"https://api.github.com/users/gpwright/events{/privacy}","received_events_url":"https://api.github.com/users/gpwright/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-21T16:59:37Z","updated_at":"2015-09-29T18:11:46Z","closed_at":null,"body":"Latest version of h5py built against hdf5 swmr no longer supports creation of non string attributes for example ints or floats.  String attributes work without error.\r\n\r\nMy configuration:\r\n\r\nOS: Ubuntu 14.04. \r\nhdf5 version: hdf5-1.9.222-swmr0\r\nh5py version: ea4e2d6bd978b226e9223053592b52dbfb5a2f2b\r\n\r\nE.g.\r\n\r\n```python\r\nimport h5py\r\n\r\nf = h5py.File(\"test.h5\", \"w\")\r\ng = f.create_group(\"group\")\r\ng.attrs[\"A\"] = 2\r\n```\r\n\r\nResult:\r\n\r\n```python\r\ngpwright@gpwright-desktop:~$ python test.py\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 5, in <module>\r\n    g.attrs[\"A\"] = 2\r\n  File \"_objects.pyx\", line 54, in h5py._objects.with_phil.wrapper (/home/gpwright/Sources/h5py/h5py/_objects.c:2511)\r\n  File \"_objects.pyx\", line 55, in h5py._objects.with_phil.wrapper (/home/gpwright/Sources/h5py/h5py/_objects.c:2464)\r\n  File \"/usr/local/lib/python2.7/dist-packages/h5py-2.5.0-py2.7-linux-x86_64.egg/h5py/_hl/attrs.py\", line 93, in __setitem__\r\n    self.create(name, data=value, dtype=base.guess_dtype(value))\r\n  File \"/usr/local/lib/python2.7/dist-packages/h5py-2.5.0-py2.7-linux-x86_64.egg/h5py/_hl/attrs.py\", line 169, in create\r\n    htype = h5t.py_create(original_dtype, logical=True)\r\n  File \"h5t.pyx\", line 1448, in h5py.h5t.py_create (/home/gpwright/Sources/h5py/h5py/h5t.c:14960)\r\n  File \"h5t.pyx\", line 1468, in h5py.h5t.py_create (/home/gpwright/Sources/h5py/h5py/h5t.c:14791)\r\n  File \"h5t.pyx\", line 1482, in h5py.h5t.py_create (/home/gpwright/Sources/h5py/h5py/h5t.c:14336)\r\n  File \"h5t.pyx\", line 1302, in h5py.h5t._c_int (/home/gpwright/Sources/h5py/h5py/h5t.c:12338)\r\nValueError: Not a datatype or dataset (Not a datatype or dataset)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/h5py/h5py/issues/comments/144139487","html_url":"https://github.com/h5py/h5py/issues/599#issuecomment-144139487","issue_url":"https://api.github.com/repos/h5py/h5py/issues/599","id":144139487,"user":{"login":"gpwright","id":5623282,"avatar_url":"https://avatars.githubusercontent.com/u/5623282?v=3","gravatar_id":"","url":"https://api.github.com/users/gpwright","html_url":"https://github.com/gpwright","followers_url":"https://api.github.com/users/gpwright/followers","following_url":"https://api.github.com/users/gpwright/following{/other_user}","gists_url":"https://api.github.com/users/gpwright/gists{/gist_id}","starred_url":"https://api.github.com/users/gpwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpwright/subscriptions","organizations_url":"https://api.github.com/users/gpwright/orgs","repos_url":"https://api.github.com/users/gpwright/repos","events_url":"https://api.github.com/users/gpwright/events{/privacy}","received_events_url":"https://api.github.com/users/gpwright/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T18:11:46Z","updated_at":"2015-09-29T18:11:46Z","body":"@andrewcollette I don't think its a problem with HDF5... I just ran all the unit tests on 1.9.222 and they all pass.  This includes test_genprop_basic_class in tgenprop.c which calls get_class, close_class etc in the same sequence as above.  Also I had some email discussion with HDF Group back in August about it, and they agreed that it's a h5py problem.\r\n\r\nI'm using h5py version 2.5 successfully with the older version 1.9.178 although it has one issue which I can avoid (that has been fixed in 1.9.222).  But I think that for version 1.9.222 some updates are needed to h5py.  Is it possible for you to look at it?  Or could you write some explanation of how the property wrapper classes interact with hdf5 classes and I am happy to look into it more myself.  Is there any developer documentation I could take a look at?\r\n\r\nThanks,\r\nGeoff\r\n"}}