GephiStreamer icon indicating copy to clipboard operation
GephiStreamer copied to clipboard

Workspace name

Open studiawan opened this issue 9 years ago • 4 comments

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.

studiawan avatar Feb 09 '16 05:02 studiawan

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.

totetmatt avatar Feb 09 '16 07:02 totetmatt

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.

studiawan avatar Feb 09 '16 09:02 studiawan

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.

scovetta avatar Apr 14 '18 20:04 scovetta

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)

rokdd avatar Aug 23 '19 08:08 rokdd