Closed SilverDash closed 3 years ago
"version": 2,
"controller": {},
"workers": [{
"type": "router",
"options": {},
"realms": [
{
"name": "serpent",
"roles": [{
"name": "backend",
"permissions": [{
"uri": "*",
"allow": {
"call": true,
"register": true,
"publish": true,
"subscribe": true
},
"disclose": {
"caller": true,
"publisher": true
}
}]
},
{
"name": "client",
"permissions": [{
"uri": "*",
"allow": {
"call": true,
"register": false,
"publish": false,
"subscribe": true
},
"disclose": {
"caller": true,
"publisher": true
},
"cache": true
}]
}
]
}
],
"transports": [{
"type": "websocket",
"endpoint": {
"interface": "localhost",
"type": "tcp",
"port": 9999
},
"auth": {
"wampcra": {
"type": "static",
"users": {
"serpent": {
"secret": "serpent",
"role": "backend"
},
"dashboard": {
"secret": "serpent",
"role": "client"
}
}
}
}
}]
}]
}
Here is the config
CPython-IOCPReactor
so you're on windows, right? pls add full version output via: crossbar version
v18.6.1
The current release version of Crossbar.io is https://pypi.org/project/crossbar/20.12.3/
Could you pls try v20.12.3 (on CPython on Windows)?
Crossbar.io : 18.6.1
Autobahn : 20.12.3
Twisted : 20.3.0-IOCPReactor
LMDB : 1.0.0/lmdb-0.9.24
Python : 3.6.12/CPython
Frozen executable : no
Operating system : Windows-10-10.0.18362-SP0
Host machine : AMD64
Release key : RWS0sX8obJP12KpJWWHyPSsJPeAxUVm+JjPWsPKCgxap8uTHuWeWU7ez
I'll do a quick version upgrade test. But I'm not sure if Serpent requires lower version or not.
Version upgrade fixed the initial error. Looks like a version mistake on Serpent dev for now. If I find the issue crops up again I'll reopen.
I'm not sure why Serpent directly depends on Crossbar.io, and why it does pin the version in doing so, and also not sure about this stuff:
oberstet@intel-nuci7:~/scm/3rdparty/SerpentAI$ find . -type f -exec grep -Hi "crossbar" {} \;
...
./serpent/game.py: self.crossbar_process = None
./serpent/game.py: self.start_crossbar()
./serpent/game.py: self.stop_crossbar()
./serpent/game.py: def start_crossbar(self):
./serpent/game.py: if self.crossbar_process is not None:
./serpent/game.py: self.stop_crossbar()
./serpent/game.py: crossbar_command = f"crossbar start --config crossbar.json"
./serpent/game.py: self.crossbar_process = subprocess.Popen(shlex.split(crossbar_command))
./serpent/game.py: signal.signal(signal.SIGINT, self._handle_signal_crossbar)
./serpent/game.py: signal.signal(signal.SIGTERM, self._handle_signal_crossbar)
./serpent/game.py: atexit.register(self._handle_signal_crossbar, 15, None, False)
./serpent/game.py: def stop_crossbar(self):
./serpent/game.py: if self.crossbar_process is None:
./serpent/game.py: self.crossbar_process.kill()
./serpent/game.py: self.crossbar_process = None
./serpent/game.py: atexit.unregister(self._handle_signal_crossbar)
./serpent/game.py: def _handle_signal_crossbar(self, signum=15, frame=None, do_exit=True):
./serpent/game.py: if self.crossbar_process is not None:
./serpent/game.py: if self.crossbar_process.poll() is None:
./serpent/game.py: self.crossbar_process.send_signal(signum)
./serpent/serpent.py:from serpent.utilities import clear_terminal, display_serpent_logo, is_linux, is_windows, wait_for_crossbar
./serpent/serpent.py: # Install Crossbar
./serpent/serpent.py: subprocess.call(shlex.split("pip install crossbar==18.6.1"))
./serpent/serpent.py: # Copy the Crossbar config
./serpent/serpent.py: os.path.join(os.path.dirname(__file__), "crossbar.json"),
./serpent/serpent.py: os.path.join(os.getcwd(), "crossbar.json")
./serpent/serpent.py: wait_for_crossbar()
...
FWIW, the actual solution might be cleaning this up - have Crossbar.io be a project dependency like a server package (eg Nginx), but not a direct package dependency. Then, only rely on Crossbar.io CLI for starting from Serpent (if that is what was desired in the first place).
Yeah I'm not sure why it's installing a specific version. I took a look at that and assumed the dev had a reason.
Ran into an issue with crossbar refusing to start. Not sure if this is my end or your end.
Running python 3.6 via conda
Yes I'm trying to work with serpent AI :) Need to learn it a bit.