Closed wyf1995 closed 4 years ago
have you solved this problem
I think we have?
This still seems to be a problem unfortunately...
Convert string mentioned in the argument of 'hdf5_handler' function to bytes by:
hdf5 = hdf5_handler(bytes("./data/abide.hdf5",encoding="utf-8"), 'a' )
It works !
(Python version: 3.7.3 & h5py version: '2.10.0')
![Uploading 20180821153238.png…]() when I run the prepared_data.py, I can't solve the problem .Could you help me? Thank you !!!!
problem: Traceback (most recent call last): File "D:/Project/lsa-pucrs-acerta-abide-cc28c56/prepare_data.py", line 128, in
hdf5 = hdf5_handler("./data/abide.hdf5", "a")
File "D:\Project\lsa-pucrs-acerta-abide-cc28c56\utils.py", line 50, in hdf5_handler
with contextlib.closing(h5py.h5f.open(filename, fapl=propfaid)) as fid:
File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 65, in h5py.h5f.open
TypeError: expected bytes, str found