You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working with a student on a modification to the installer that will automatically compile the example_apparatus connection table during labscript_profile_create. Goal is to make initial install of labscript less annoying by ensuring BLACS can open with something without requiring manual steps.
Trying things out, it seemed like the synchronous compile functions in runmanager would be perfect (runmanager.compile_labscript and/or runmanager.compile_labscript_with_globals_files). But these functions are not used anywhere in the suite and don't appear to work out of the box.
Compilation failed with errors:
Traceback (most recent call last):
File "C:\Users\naqsL\labscript-suite\userlib\labscriptlib\example_apparatus\connection_table.py", line 27, in<module>
stop(1.0)
File "C:\Users\naqsL\src\labscript-suite\labscript\labscript\labscript.py", line 704, in stop
generate_code()
File "C:\Users\naqsL\src\labscript-suite\labscript\labscript\labscript.py", line 504, in generate_code
raise LabscriptError('hdf5 file for compilation not set. Please call labscript_init')
labscript.utils.LabscriptError: hdf5 file for compilation not set. Please call labscript_init
Question is: are we just using these functions incorrectly, or are they actually deprecated and should just be deleted/reworked?
The text was updated successfully, but these errors were encountered:
Yep, those functions look completely broken and should be replaced or removed. The correct way to do it is inside the batch_compiler.py file.
I know you said you want to do it synchronously, but I would consider still using the async functions (that spawn a new process running the batch_compiler.py file) and just waiting for it to complete in the terminal. I'm pretty sure you should be able to redirect the compilation output to the terminal as well? The advantage of doing this is that if it crashes badly, it won't take down the whole command and you can output useful error messages and/or continue on with other things.
Makes sense. I'll put together a PR to remove the synchronous functions. I may also add some default options to labscript_compile_* functions so that they just work when compiled naively.
dihm
linked a pull request
Jun 18, 2024
that will
close
this issue
I'm currently working with a student on a modification to the installer that will automatically compile the example_apparatus connection table during
labscript_profile_create
. Goal is to make initial install of labscript less annoying by ensuring BLACS can open with something without requiring manual steps.Trying things out, it seemed like the synchronous compile functions in runmanager would be perfect (
runmanager.compile_labscript
and/orrunmanager.compile_labscript_with_globals_files
). But these functions are not used anywhere in the suite and don't appear to work out of the box.Gives the following error
Question is: are we just using these functions incorrectly, or are they actually deprecated and should just be deleted/reworked?
The text was updated successfully, but these errors were encountered: