FileNotFoundError: [Errno 2] No such file or directory: 'hg' while trying to compile connection table

55 views
Skip to first unread message

sanika sandeep

unread,
Feb 27, 2023, 3:46:35 PM2/27/23
to the labscript suite
Hello,

I'm new to labscript and not sure how to resolve this error I'm getting while trying to compile my connection table on blacs. My connection table looks like:
from labscript import *
from labscript_devices.PulseBlasterUSB import PulseBlasterUSB
PulseBlasterUSB(name='pulseblaster', board_number = 0,)
for i in range (0, pulseblaster.n_flags):
DigitalOut(
parent_device = pulseblaster.direct_outputs, \
name = "pulse%s" %i, connection = 'flag %s' %i
)
if __name__ == '__main__':
start()
stop(1.0)

Philip Starkey

unread,
Feb 28, 2023, 7:30:59 AM2/28/23
to the labscript suite
Hi,

“Hg” is the executable for the mercurial version control system. Labscript repositories used to use mercurial as the version control system before we moved to GitHub. Some support is still present for labs that haven’t migrated entirely to git, but it should be disabled by default.

The use of mercurial/hg should be disabled for new installs but it looks like we forgot to update the default value in the example lab config file. Could you edit your labconfig file and change save_hg_info to False

That should hopefully stop the error. If that doesn’t fix it, could you please let us know what version of labscript you are using?

Cheers,
Phil

sanika sandeep

unread,
Mar 21, 2023, 2:01:14 AM3/21/23
to the labscript suite
Hi Phil,

I saved hg info to false however I'm still receiving the same error.  I'm not sure what version of labscript I'm currently using, how do I check that? I did just update runmanager, labscript and blacs through terminal and am still getting the same error.

Thanks,
Sanika

Screen Shot 2023-03-21 at 12.47.49 AM.png

dihm....@gmail.com

unread,
Mar 24, 2023, 4:00:41 PM3/24/23
to the labscript suite
Sanika,

Assuming you are using a conda environment, you can use the command `conda list` to show all installed packages in the environment. It will list the versions of everything.

If you used a pip install, you can use the `pip show <package>` command to show the details of each installed package. So `pip show labscript` will show the version (along with a great many other details).

As for the error, if your labconfig was updated, it shouldn't still be calling that command. Perhaps something has prevented the change from propagating? Could you confirm that you edited the correct labconfig file (ie not the template, but the one named after your computer)? Could you also confirm that you restarted all of the programs after updating the config? Labconfig stuff is often read at program start only so changes will only be seen if things are restarted. You may also need to restart the zlock and zlog processes in extreme cases (easiest done by rebooting the computer).

-David

sanika sandeep

unread,
Mar 27, 2023, 2:36:21 PM3/27/23
to the labscript suite
Hello, 

Ok the version of the labscript I'm using is 3.2.0 and I double checked that I edited my labconfig and not the example one. There also seems to be multiple labscript suite folders on my device, I'm not too sure why there are so many (I've attached a screenshot). The folder with the connection table I want to use however is on my desktop, and I'm manually navigating to the right folder on runmanager, could this be causing an error? 

Screen Shot 2023-03-27 at 1.34.39 PM.png

sanika sandeep

unread,
Mar 27, 2023, 2:44:55 PM3/27/23
to the labscript suite
Also I'm confused about this warning I'm getting before i run runmanager. 
It loads a default config file and says "previously selected labscript file no longer exists" however this is the file that I am trying to use for my connection-table. 

Screen Shot 2023-03-27 at 1.41.09 PM.png

dihm....@gmail.com

unread,
Apr 13, 2023, 9:29:24 AM4/13/23
to the labscript suite
Sanika,

The "previously selected labscript file no longer exists" error seems to me a sign that your paths are confused. If you actually have multiple labscript installations, that wouldn't super surprise me. Managing multiple installations requires significant care since labscript itself presumes the labconfig file is located in the user's home folder in the `labscript-suite/labconfig` folder. If the labconfig in that folder doesn't have the correct paths to all the userlib/app config components, you are going to get some odd behavior.

Unfortunately, tracking down path issues is something of a bespoke experience; there are many potential issues that all depend on a lot of little details that are difficult to track down. My best advice without knowing a lot more detail about your setup is to carefully track what paths/config files are actually being used. Assuming those other installations are not from other users, limiting the number of installs is a good place to start. After that, you might consider running some of the basic labscript config file commands from a terminal to see what paths are actually being used. The source files that handle these paths are in labscript-utils/labscript_utils/labconfig.py and labscript-utils/labscript_profile/__init__.py. `default_labconfig_path` and `LabConfig` are good places to start.

-David
Reply all
Reply to author
Forward
0 new messages