Closed tritemio closed 6 years ago
@DanielisRutkauskas, it should work in 0.6.3 as well, if not is a bug or an issue with installation. I tested it on several windows and mac os machines. Did you install fretbursts via conda? What operating system are you using? Do you get any error message? Does it open the file dialog or not? If the dialog launches, can you type filename
in a cell to see the value of filename after using the dialog?
From @DanielisRutkauskas on May 15, 2017 21:2
Yes, I installed FRETBursts via conda. Windows 10. I get the following: AssertionError Traceback (most recent call last)
Mhh, strange. Does calling:
d = loader.photon_hdf5(filename.decode())
makes any difference?
Can you also post the output of conda list
?
From @DanielisRutkauskas on May 16, 2017 6:28
Yes, this makes the difference: d = loader.photon_hdf5(filename.decode()) does not produce an error. However, d does not contain ph_times_t attribute any more. Instead it contains ph_times_m, which should not be there before executing alex functions. And like this, it is not possible to execute any alex functions on d. Conda list is attached. condalist.txt
@DanielisRutkauskas, you are likely opening an old file that you didn't update to use the ALEX measurement_type. You can check this by opening the file with the graphical utility HDFView, you should see smFRET-usALEX
in measurement_type
.
The fact that it didn't give any error means that the file is now found (unlike before).
The issue is that OpenFileDialog returns a binary string (note the b
before the string) and in your system os.path.isfile
does not recognize it as a correct file name. I think the easiest fix would be for FRETBursts to check if the input filename is a binary string and convert it to a normal unicode string so that there are no errors. I cannot get this error on another windows 10 machine so it must depend on some special characters or system locale.
When using OpenFileDialog you can use the already mentioned workaround until the next release:
d = loader.photon_hdf5(filename.decode())
I let you know when I have a fix so you can test it before the next release.
From @DanielisRutkauskas on May 17, 2017 7:11
All right, the workaround works now, as you suggested it must have been some confusion with Alex/non-Alex files. Thank you for the effort.
From @DanielisRutkauskas on May 15, 2017 8:59
Hi,
In FRETBursts release 0.6.3 the combination: filename = OpenFileDialog() d = loader.photon_hdf5(filename) does not work, whereas it functioned with older versions. Can this be fixed?
Danielis
Copied from original issue: tritemio/FRETBursts#59