Skip to content

Issue with threads #19

@jacknicoludis

Description

@jacknicoludis

I started ipymol using:

from ipymol import viewer as pymol
pymol.start()

However, if I try to re-run the cell, I get the following error:

---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-108-d61299d94d8a> in <module>
----> 1 pymol.start()

~/anaconda3/lib/python3.7/site-packages/ipymol/core.py in start(self)
39 print("A PyMOL RPC server is already running.")
40 return
---> 41 self._thread.start()
42 self._server = Server(
43 uri="http://%s:%d/RPC2" % (self.host, self.port)

~/anaconda3/lib/python3.7/threading.py in start(self)
841
842 if self._started.is_set():
--> 843 raise RuntimeError("threads can only be started once")
844 with _active_limbo_lock:
845 _limbo[self] = self

RuntimeError: threads can only be started once

How can I end a thread to re-run cells with ipymol commands?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions