New installation of anaconda and labscript, errors on launching applications

49 views
Skip to first unread message

Cody B

unread,
May 8, 2023, 1:37:34 PM5/8/23
to the labscript suite
Hello,

I just recently installed the updated version of the labscript suite on a computer and have been running into an issue. When launching any of the applications (lyse, runmanager, or when compiling the connection table in blacs), I get this error message:

Title:
Unhandled exception in __main__.py

Header:
It looks like an error has occured:
TypeError: __init__() got an unexpected keyword argument 'allow_insecure'

Traceback:
Traceback (most recent call last):
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\zprocess\security.py", line 360, in instance
    return cls._instances[cls, shared_secret]
  File "C:\ProgramData\miniconda3\envs\py38\lib\weakref.py", line 131, in __getitem__
    o = self.data[key]()
KeyError: (<class 'labscript_utils.ls_zprocess.Context'>, 'removed')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\lyse\__main__.py", line 2337, in <module>
    app = Lyse()
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\lyse\__main__.py", line 1956, in __init__
    self.output_box = OutputBox(self.ui.verticalLayout_output_box)
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\labscript_utils\qtwidgets\outputbox.py", line 23, in __init__
    context = Context.instance()
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\labscript_utils\ls_zprocess.py", line 249, in instance
    return super(Context, cls).instance(shared_secret=config['shared_secret'])
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\zprocess\security.py", line 362, in instance
    instance = cls(io_threads, shared_secret=shared_secret)
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\labscript_utils\ls_zprocess.py", line 241, in __init__
    SecureContext.__init__(
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\zprocess\security.py", line 342, in __init__
    auth.start()
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\zmq\auth\thread.py", line 106, in start
    super().start()
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\zmq\auth\base.py", line 82, in start
    self.zap_socket = self.context.socket(zmq.REP, socket_class=zmq.Socket)
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\labscript_utils\ls_zprocess.py", line 254, in socket
    return SecureContext.socket(self, *args, **kwargs)
  File "C:\ProgramData\miniconda3\envs\py38\lib\site-packages\zmq\sugar\context.py", line 362, in socket
    s: ST = socket_class(  # set PYTHONTRACEMALLOC=2 to get the calling frame
TypeError: __init__() got an unexpected keyword argument 'allow_insecure'


I've tried uninstalling both labscript and anaconda, then installed miniconda and labscript again, and still get the same error message. Would anyone possibly be able to help explain what's going on here and how to fix this?

Thanks,
Cody Bassett

Rohit Prasad Bhatt

unread,
May 8, 2023, 4:16:07 PM5/8/23
to 'Philip Starkey' via The labscript suite
Hi Cody,

Seems like a similar issue. 

Regards,
Rohit Prasad Bhatt

--
You received this message because you are subscribed to the Google Groups "the labscript suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuit...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/labscriptsuite/98c41eee-1ad9-4f16-b58e-1386a8149ac6n%40googlegroups.com.

Chris Billington

unread,
May 8, 2023, 6:22:09 PM5/8/23
to labscri...@googlegroups.com
Hi Cody,

Could you let me know what Python version, pyzmq version, and zprocess version you have?

This seems like it ought to be a simple mismatch of things (It looks like a normal zmq socket is being instantiated, instead of our custom subclass which accepts more arguments), but I can't reproduce the problem on my system, and I can't see a problem where I would expect it in the pyzmq source code.

-Chris

Cody B

unread,
May 9, 2023, 11:10:35 AM5/9/23
to the labscript suite
Hi Rohit and Chris,

Rohit, I did see this thread, but I was getting seemingly very different error codes, so I thought it may have been a different issue. I did try downgrading the pyzmq version though, and that indeed did fix the problem.

Chris, my versions (when producing the problem) were as follows:
Python:     3.8.16
pyzmq:     25.0.2
zprocess: 2.22.0

I downgraded pyzmq to 23.2.0, which is a known working version of that package on my other computer. After doing this, I was able to launch the applications.

Thanks,
Cody

Chris Billington

unread,
May 9, 2023, 8:12:36 PM5/9/23
to labscri...@googlegroups.com
Thanks Cody,

I reproduced the problem on my system and have added a fix to labscript_utils. If you upgrade to labscript_utils 3.3.1, it should work with pyzmq 25.

Regards,

Chris

Reply all
Reply to author
Forward
0 new messages