GephiStreamer
GephiStreamer copied to clipboard
Workspace name
By default, Gephi provides us Workspace 0
for workspace name. On the other hand, GephiStreamer uses workspace0
as default. I tried to change the default workspace name from GephiStreamer using this option:
stream = streamer.Streamer(streamer.GephiWS(hostname="localhost", port=8080, workspace="Workspace 0"))
However, I got the following error: ws4py.exc.HandshakeError: Invalid response status: 400 Bad Request
.
It seems we have problem in class GephiWS (streamer.py):
def _generate_url(self): return "ws://{hostname}:{port}/{workspace}?operation=updateGraph".format(hostname=self.hostname, port=self.port, workspace=self.workspace)
where workspace is set without any space character?
Thanks.
That's because, Workspace 0
is just the name in Gephi, but within the Stream plugin, it's translated to workspace0
(lower char, no space). And more generally , each Workspace X
should be translated workspaceX
.
I am using Gephi 0.8.2 and I have to rename (in menu Workspace -> Rename) the default workspace name (Workspace 0) to "workspace0" in order to run GephiStreaming successfully. Without renaming it, the error message above always shows up.
What am I missing? Thank you.
Using Gephi 0.9.2, the initial workspace is "Workspace 1", so I needed to set workspace="workspace1" in order to get it to connect.
Note that the title of workspace is used for identification in lowercase. When you title it in Gephi "TEST" you have to call "test" in code (Gephy 9.2 / Graphstreamer 2.0.3)