{"action":"created","issue":{"url":"https://api.github.com/repos/fact-project/erna/issues/47","repository_url":"https://api.github.com/repos/fact-project/erna","labels_url":"https://api.github.com/repos/fact-project/erna/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/fact-project/erna/issues/47/comments","events_url":"https://api.github.com/repos/fact-project/erna/issues/47/events","html_url":"https://github.com/fact-project/erna/issues/47","id":267701466,"number":47,"title":"Fix api in erna.hdf_utils","user":{"login":"jebuss","id":7489182,"avatar_url":"https://avatars0.githubusercontent.com/u/7489182?v=4","gravatar_id":"","url":"https://api.github.com/users/jebuss","html_url":"https://github.com/jebuss","followers_url":"https://api.github.com/users/jebuss/followers","following_url":"https://api.github.com/users/jebuss/following{/other_user}","gists_url":"https://api.github.com/users/jebuss/gists{/gist_id}","starred_url":"https://api.github.com/users/jebuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebuss/subscriptions","organizations_url":"https://api.github.com/users/jebuss/orgs","repos_url":"https://api.github.com/users/jebuss/repos","events_url":"https://api.github.com/users/jebuss/events{/privacy}","received_events_url":"https://api.github.com/users/jebuss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-23T14:58:26Z","updated_at":"2018-02-28T12:35:51Z","closed_at":null,"author_association":"OWNER","body":"HI, erna gather_fits is not working with the current version:\r\n\r\n```\r\nerna_gather_fits std_analysis 0.17.2 /gpfs0/fact/processing/erna/datasets/Crab1516_no_data_check_std_analysis_0.17.2.hdf5 --start=2015-8-31 --end=2016-3-19 --source=\"Crab\" --datacheck=/gpfs0/fact/processing/erna/no_datacheck.txt\r\nFound 3761 runs with a total ontime of 260.42 h\r\nOutputfile exists! Overwrite? [y, N]: y\r\n  0%|                                                                      | 0/3761 [00:00<?, ?it/s]\r\nTraceback (most recent call last):\r\n  File \"/swdev_nfs/anaconda3/bin/erna_gather_fits\", line 11, in <module>\r\n    load_entry_point('erna==0.5.0', 'console_scripts', 'erna_gather_fits')()\r\n  File \"/swdev_nfs/anaconda3/lib/python3.6/site-packages/click/core.py\", line 722, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/swdev_nfs/anaconda3/lib/python3.6/site-packages/click/core.py\", line 697, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/swdev_nfs/anaconda3/lib/python3.6/site-packages/click/core.py\", line 895, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/swdev_nfs/anaconda3/lib/python3.6/site-packages/click/core.py\", line 535, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/swdev_nfs/anaconda3/lib/python3.6/site-packages/erna/scripts/gather_fits.py\", line 185, in main\r\n    write_fits_to_hdf5(outputfile, successful_jobs.result_file, mode='a')\r\n  File \"/swdev_nfs/anaconda3/lib/python3.6/site-packages/erna/hdf_utils.py\", line 88, in write_fits_to_hdf5\r\n    compression=compression,\r\n  File \"/swdev_nfs/anaconda3/lib/python3.6/site-packages/fact/io.py\", line 318, in initialize_h5py\r\n    dtypes = array.dtype\r\nAttributeError: 'numpy.dtype' object has no attribute 'dtype'Ah\r\n```\r\n\r\nThe problem is in  `erna.hdf_utils` line 86\r\n\r\n```\r\nif len(names) > 0:\r\n                    array = recfunctions.append_fields(\r\n                        array,\r\n                        names=names,\r\n                        data=arrays,\r\n                        usemask=False,\r\n                    )\r\n\r\n                if not initialized:\r\n                    initialize_h5py(\r\n                        hdf_file,\r\n                        array.dtype,\r\n                        key=key,\r\n                        compression=compression,\r\n                    )\r\n```\r\nLine 86 should be without .dtype\r\n"},"comment":{"url":"https://api.github.com/repos/fact-project/erna/issues/comments/369226247","html_url":"https://github.com/fact-project/erna/issues/47#issuecomment-369226247","issue_url":"https://api.github.com/repos/fact-project/erna/issues/47","id":369226247,"user":{"login":"MaxNoe","id":5488440,"avatar_url":"https://avatars3.githubusercontent.com/u/5488440?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxNoe","html_url":"https://github.com/MaxNoe","followers_url":"https://api.github.com/users/MaxNoe/followers","following_url":"https://api.github.com/users/MaxNoe/following{/other_user}","gists_url":"https://api.github.com/users/MaxNoe/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxNoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxNoe/subscriptions","organizations_url":"https://api.github.com/users/MaxNoe/orgs","repos_url":"https://api.github.com/users/MaxNoe/repos","events_url":"https://api.github.com/users/MaxNoe/events{/privacy}","received_events_url":"https://api.github.com/users/MaxNoe/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T12:35:51Z","updated_at":"2018-02-28T12:35:51Z","author_association":"OWNER","body":"This is fixed, right?"}}
{"actor":{"display_login":"MaxNoe"}}