Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to retrieve data to gephi #740

Open
rescuehero opened this issue Feb 13, 2018 · 25 comments
Open

trying to retrieve data to gephi #740

rescuehero opened this issue Feb 13, 2018 · 25 comments

Comments

@rescuehero
Copy link

rescuehero commented Feb 13, 2018

Hey folks,

i used this tutorial: https://tbgraph.wordpress.com/2017/04/01/neo4j-to-gephi/
to come along with neo4j, APOC and gephi.

Now i wanted to stream my database to gephi, but it is not working, error message below.

database has nodes named solution which can include one another with a given weight. In the labels there are Ä's sometimes, but I read it should be UTF-8 encoded.

CYPHER:

MATCH path = (:solution)-[:INCLUDES]->(:solution)
CALL apoc.gephi.add(null,'workspace1',path,'weight') yield nodes
return *

error:

Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke procedure apoc.gephi.add: Caused by: java.lang.RuntimeException: Invalid UTF-8 middle byte 0x6e
at [Source: apoc.export.util.CountingInputStream@2afa9c89; line: 1, column: 138]

I think this is not intended.

Kind regards
resc

@jexp
Copy link
Member

jexp commented Feb 20, 2018

I tried the same but can't reproduce.

Where exactly are your umlauts, can you show an example?

match (m:`MovieÄ`)<-[r]-(a)
call apoc.gephi.add(null,"workspace1",[m,a,r],'weight',['title','name']) yield nodes
return nodes

@rescuehero
Copy link
Author

rescuehero commented Feb 20, 2018

Hey Michael,

i created a minimal example of the issue:

Create statement:

CREATE p=(n:movie{name:'Mätrix'})<-[:ACTS_IN]-(g:actor{name:'Keanu'})-[:ACTS_IN]->(m:movie{name:'Mätrix II'})

Gephi Call:

MATCH path=(:actor)-[:ACTS_IN]->(:movie)
CALL apoc.gephi.add(null,'workspace1',path,'weight') yield nodes
return *

error message:

Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke procedure apoc.gephi.add: Caused by: java.lang.RuntimeException: Invalid UTF-8 middle byte 0x74
at [Source: apoc.export.util.CountingInputStream@44fec338; line: 2, column: 124]

gephiview:
gephiview

so the n:movie with n.name='Mätrix' is not shown in gephi.
In bigger Graphs, it is complectely random which nodes are imported and which ones are not (as far as I can see)

@tomasonjo
Copy link
Contributor

I have tried your example and couldn't reproduce the issue. I am running Neo4j 3.3.1 CE with Gephi 0.9.2

matrix

@rescuehero
Copy link
Author

I am running Neo4j 3.3.3 CE and Gephi 0.9.2

I am kind of confused why you can't reproduce it.
Any ideas which information I could provide you?

@jexp
Copy link
Member

jexp commented Feb 20, 2018

Ya, I tried it too and it worked fine for me too.
I can try a patch for the gephi function and send you a jar to try.

@rescuehero
Copy link
Author

rescuehero commented Feb 20, 2018

I am open for all possible solutions :)
tried it on several machines. One running Win7, one laptop running Win10, and my tower running Win10
It is always the Neo4j Desktop version if that matters.

edit: tried it in a new project as well, not working.
error:

Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke procedure apoc.gephi.add: Caused by: java.lang.RuntimeException: Invalid UTF-8 middle byte 0x74
at [Source: apoc.export.util.CountingInputStream@9bca886; line: 2, column: 126]

@jexp
Copy link
Member

jexp commented Feb 20, 2018

Can you try this jar: https://www.dropbox.com/s/wyzn9ezd7rfsv8v/apoc-3.3.0.1-all.jar?dl=0

What locale are you running?

@rescuehero
Copy link
Author

rescuehero commented Feb 21, 2018

neo4j Desktop Version: 1.0.14 and 1.0.15 tested
locale: Deutsch (Deutschland) / german (Germany)
de - DE

trying this .jar:
still the same error

edit:
on a freshly reinstalled system with your jar simply pasted in the /plugins directory of the afterwards restarted database and editing the security-privileges for APOC usage, error still persists :

Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke procedure apoc.gephi.add: Caused by: java.lang.RuntimeException: Invalid UTF-8 middle byte 0x74
at [Source: apoc.export.util.CountingInputStream@e5c1e55; line: 2, column: 126]

@rescuehero
Copy link
Author

rescuehero commented Mar 6, 2018

something new about this topic? :)

edit:
When using a function to replace every node.name:

specchar = ['ä', 'Ä', 'ü', 'Ü', 'ö', 'Ö', 'ß']
specchar_replace = ['ae', 'Ae', 'ue', 'Ue', 'oe', 'Oe', 'ss']

It works. Still confused, because the new sourcecode of apoc should use utf-8 encoding

@xznhj8129
Copy link

Same problem
Failed to invoke procedure `apoc.gephi.add`: Caused by: java.lang.RuntimeException: Invalid UTF-8 middle byte 0x6d at [Source: apoc.export.util.CountingInputStream@5370282e; line: 2, column: 151]
Replacing characters is absolutely not an option

@jexp
Copy link
Member

jexp commented Mar 23, 2018

If you can help me reproduce it, that would be super helpful.

I couldn't reproduce it with the information from @rescuehero

@xznhj8129
Copy link

No idea how... try to import some nodes with UTF-8 characters like chinese, arabic, russian?

@rescuehero
Copy link
Author

rescuehero commented Mar 23, 2018

mh, i already tried to give all necessary information.

Are you using a Windows-distribution @jexp or are you trying it on a Linux-distribution?

all info from me:
-Win7 and Win10 tested
-neo4j 3.3.3
-APOC 3.3.0.2
-tried on neo4j-console and on neo4j-desktop 1.0.13-1.0.17
-locale: DE_de
-Gephi 0.9.2

@snow-frog Please provide your information as well, to help solving this issue.
@jexp Do you have any ideas of additional information u would need?

@xznhj8129
Copy link

  • Win 8.1 (sorry)
  • neo4j Community Edition 3.2.3
  • Apoc 3.2.3.6
    My issue was fixed by just switching to the very newest neo4j independent of neo4j non-CE

@rescuehero
Copy link
Author

rescuehero commented Mar 26, 2018

@snow-frog so you switched to this version? link

@xznhj8129
Copy link

Yes

@jexp
Copy link
Member

jexp commented Apr 10, 2018

@rescuehero OSX

@jexp
Copy link
Member

jexp commented Apr 10, 2018

I'm running on a German locale as well.

@jexp
Copy link
Member

jexp commented Apr 10, 2018

Seems like a one-off error somewhere ...

@jexp
Copy link
Member

jexp commented Apr 16, 2018

It seems to be releated to Gephi running on Windows, from my colleague @tomgeudens who took it upon himself to test it out (THANKS!!)

And that's confirmed. With Neo4j 3.3.5 running on Windows and Gephi 0.92 running on Linux it works perfectly (very nice in fact, I hadn't used Gephi before). The Neo4j installation doesn't matter or make a difference, it's the Gephi installation on Windows that breaks things ...
Can't find the Gephi configuration option that could correct this (if there is one in the first place). There's not only gephi.conf, there's also configuration files for at least 5 parts of the streaming module. Needle in a haystack.

@rescuehero
Copy link
Author

Mhh, I gonna give it a look this evening, maybe I will be able to find the needle :P
Thank you for clarifying this! If I do not find it, I think I should move the Issue in the belonging repo.

@jexp
Copy link
Member

jexp commented Nov 6, 2018

Perhaps worthwhile to ask at the Gephi repo/forums?

@mingchau
Copy link

Hello, similar error occurred here.

I'm using the APOC to stream data to gephi (0.92) on Windows 10.

With the cql query:

match p=(user: User)-[r1:buy]->(p1:Product)
CALL apoc.gephi.add(null,'workspace1',p,'weight') yield nodes
return *

Produce error:

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.gephi.add: Caused by: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0xc0 at [Source: (apoc.export.util.CountingInputStream); line: 1, column: 132]

For your reference, I have some properties in Chinese characters for the nodes with label of User and Product.

Could you help to address this?

@jexp
Copy link
Member

jexp commented Feb 22, 2019

Can you share a cypher statement to recreate the problematic data?

@jexp jexp added the Larus label Feb 22, 2019
@mingchau
Copy link

Hi @jexp
Considering create the data and display the graph in Neo4j browser with this statement:

create p=(l: User1 {id:1, order_types: '甲类,乙类', nickname: '哈哈😄'})-[r:Buy1 {created_at: '2019-02-24 09:30:21'}]->(m: Product1 {name: '此产品', id: 'ef4123ad'}) 
return p;

Then stream the data with these statements:

match p=(u1: User1)-[r1:Buy1]->(p1:Product1)
CALL apoc.gephi.add(null,'workspace1',p,'weight') yield nodes
return p

Raise error:

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.gephi.add: Caused by: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xb9 at [Source: (apoc.export.util.CountingInputStream); line: 1, column: 124]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants