Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

About error of saving h5f file

41 views
Skip to first unread message

Dinh Loc Duong

unread,
Dec 28, 2022, 12:42:38 PM12/28/22
to ScopeFoundry
Dear all, 

I am learning ScopeFoundary and I started with the first my microscope example. 

Unfortunately, there is an error in saving file. I can not see the saved data file. 

Selected the save option returns an error: 

2022-12-28T10:10:43 - CRITICAL: root :Unhandled exception:Traceback (most recent call last): File "C:\Users\q37c583\.conda\envs\scopefoundry\lib\site-packages\ScopeFoundry\measurement.py", line 25, in run self.measurement._thread_run() File "C:\Users\q37c583\.conda\envs\scopefoundry\lib\site-packages\ScopeFoundry\measurement.py", line 179, in _thread_run self.run() File "C:\Users\q37c583\.conda\envs\scopefoundry\lib\site-packages\ScopeFoundryHW\virtual_function_gen\sine_wave_measure.py", line 88, in run self.h5file = h5_io.h5_base_file(app=self.app, measurement=self) File "C:\Users\q37c583\.conda\envs\scopefoundry\lib\site-packages\ScopeFoundry\h5_io.py", line 65, in h5_base_file h5_file = h5py.File(fname) File "C:\Users\q37c583\.conda\envs\scopefoundry\lib\site-packages\h5py\_hl\files.py", line 533, in __init__ fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr) File "C:\Users\q37c583\.conda\envs\scopefoundry\lib\site-packages\h5py\_hl\files.py", line 226, in make_fid fid = h5f.open(name, flags, fapl=fapl) 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 106, in h5py.h5f.open FileNotFoundError: [Errno 2] Unable to open file (unable to open file: name = 'C:/Users/q37c583/fancy_microscope/data/221228_101043_sine_wave_plot.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)


I am using Anaconda with Window 10. 

ScopeFoundry is installed with python 3.7. Version 3.9 has similar issue. 

Runing without saving data works very well. 

Does anyone have the same issue? Could you give me instructions how to overcome this issue. 

With best wishes,

Loc 

Best regards,

----------------------------------

Dinh Loc Duong, PhD

MonArk Scientist and Liaison

Assistant Research Professor, Department of Physics, Montana State University

Room 202, Barnard Hall,P.O Box 173840, Bozeman, MT 59717-3840

Email: dinhlo...@montana.edu; l.duo...@gmail.com

Phone: +1-406-994-6182

Mikołaj Metelski

unread,
Jan 3, 2023, 3:48:51 AM1/3/23
to Dinh Loc Duong, ScopeFoundry
Hi Dinah Loc Duong,


On 28th December you send a message on the group board of ScopeFoundry, but I am not sure how to post this there.

My guess is that your h5py version is too high. In h5py documentation (https://docs.h5py.org/en/stable/high/file.html) one can find that

> Changed in version 3.0: Files are now opened  read-only by default. Earlier versions of h5py would pick different modes depending on the presence and permissions of the file.


This could be the source of the error. To fix this, you should downgrade h5py on your computer below version 3.0.


Best,
Nick Metelski

Dinh Loc Duong

unread,
Jan 3, 2023, 9:07:53 PM1/3/23
to ScopeFoundry
Hi Nick,

I re-installed whole things including h5py 2.10 with python 3.6. It works well. 

Thank you so much for your help.

With best wishes,
Loc
Reply all
Reply to author
Forward
0 new messages