Neo4j-import fails - csv

I'm trying to import a dataset using neo4j-import. Unfortunately the import fails with the following error message which is not saying much to me. Does anyone has an idea?
Thank you
The command was:
./neo4j-import --into /home_expes/dd77474h/neo4j-community-3.0.7/data/databases/graph.db/ --nodes /home_expes/dd77474h/Indexing-server/reduced_dbpedia_nodes.csv --relationships /home_expes/dd77474h/Indexing-server/reduced_dbpedia_relations.csv --stacktrace true --id-type
reduced_dbpedia_nodes.csv:
id:ID,uri,:LABEL
7,"http://dbpedia.org/resource/Albedo",Resource
reduced_dbpedia_relations.csv
:START_ID,:END_ID,:TYPE
1,2,"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
Error message:
Relationship --> Relationship Sparse
[>:231.50 MB/s--------------------------|LINK(3)==|*v:130.76 MB/s-----------------------------] 171M
Done in 24s 824ms
Minority relationships
[*INSERT--------------------------------------------------------------------------------------] 540K
Done in 14m 31s 126ms
Count groups
[*>:??----------------------------------------------------------------------------|COUNT------]12.2M
Done in 2s 786ms
Gather
java.lang.RuntimeException: Panic called, so exiting
at org.neo4j.unsafe.impl.batchimport.staging.AbstractStep.assertHealthy(AbstractStep.java:155)
at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep.process(ProducerStep.java:84)
at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep$1.run(ProducerStep.java:54)
Caused by: java.lang.IllegalStateException: There's no room for me for startIndex:28899 with a group count of -25966. This means that there's an asymmetry between calls to incrementGroupCount and actual contents sent into put
at org.neo4j.unsafe.impl.batchimport.RelationshipGroupCache.scanForFreeFrom(RelationshipGroupCache.java:203)
at org.neo4j.unsafe.impl.batchimport.RelationshipGroupCache.put(RelationshipGroupCache.java:159)
at org.neo4j.unsafe.impl.batchimport.CacheGroupsStep.process(CacheGroupsStep.java:48)
at org.neo4j.unsafe.impl.batchimport.CacheGroupsStep.process(CacheGroupsStep.java:31)
at org.neo4j.unsafe.impl.batchimport.staging.ProcessorStep.lambda$receive$2(ProcessorStep.java:97)
at org.neo4j.unsafe.impl.batchimport.executor.DynamicTaskExecutor$Processor.run(DynamicTaskExecutor.java:243)
Import error: Panic called, so exiting
Caused by:Panic called, so exiting
java.lang.RuntimeException: Panic called, so exiting
at org.neo4j.unsafe.impl.batchimport.staging.AbstractStep.assertHealthy(AbstractStep.java:155)
at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep.process(ProducerStep.java:84)
at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep$1.run(ProducerStep.java:54)
Caused by: java.lang.IllegalStateException: There's no room for me for startIndex:28899 with a group count of -25966. This means that there's an asymmetry between calls to incrementGroupCount and actual contents sent into put
at org.neo4j.unsafe.impl.batchimport.RelationshipGroupCache.scanForFreeFrom(RelationshipGroupCache.java:203)
at org.neo4j.unsafe.impl.batchimport.RelationshipGroupCache.put(RelationshipGroupCache.java:159)
at org.neo4j.unsafe.impl.batchimport.CacheGroupsStep.process(CacheGroupsStep.java:48)
at org.neo4j.unsafe.impl.batchimport.CacheGroupsStep.process(CacheGroupsStep.java:31)
at org.neo4j.unsafe.impl.batchimport.staging.ProcessorStep.lambda$receive$2(ProcessorStep.java:97)
at org.neo4j.unsafe.impl.batchimport.executor.DynamicTaskExecutor$Processor.run(DynamicTaskExecutor.java:243)

Thanks for your help, I found the bug. FYI see https://github.com/neo4j/neo4j/pull/8778 for fix.

Related

How to catch Joblib/Parallel Exceptions in python?

I have a use case for joblib's Parallel, delayed. I have included some feature that terminates a worker under certain conditions. However, when I do that, I am randomly yielding JoblibWebdriverException, Multiprocessing exception, JoblibURLerror, or just error.
To my great amusement, I don't find any section on how to (define?)/catch Exceptions in the docs.
When I do:
try:
Parallel(delayed(function))
except (JoblibWebdriverException | error | 'Multiprocessing exception'):
# written with separate excepts in original code
log_errors()
I yield name JoblibWebdriverException not defined followed by:
---------
Sub-process traceback
---------
Multiprocessing exception:
(trace stack)
How to catch undefined joblib Exceptions when using Parallel in python?
I would recommend using concurrent.Futures which has robust support for Exception handling. joblib is notorious for not being able to raise Exceptions from child processes to the main thread due to way the multi-processing is set up.

catching classes that do not inherit from BaseException is not allowed

I'm making a custom plugin to query a database for user info to aide customer support. My backend is slack.
Everytime I start the bot command I'm greeted with:
Computer says nooo. See logs for details:
catching classes that do not inherit from BaseException is not allowed
I'm not sure if this is warning me that I'm attempting to catch an exception that isn't a BaseClass in my code or if an unknown exception was raised and caught elsewhere outside of my plugin.
To debug I tried:
try:
do_the_thing()
except (TypeError, ValueError) as e:
return('Something went wrong.')
I also tried:
try:
do_the_thing()
except Exception as e:
return('Something went wrong.')
And I still get the errbot admonition. Note that the command still runs and does the right thing where there is no exception raised by do_the_thing().
It means that:
Somewhere in your code you have an except ... statement where the exception ... (or one of the exceptions in the sequence ...) is not a subclass of BaseException, and
An exception is being thrown that is caught by that except ... statement.
The TypeError can be raised only when an exception is actually thrown because the names you give to except ... must be evaluated for their current values at that time; just because TypeError referenced a particular class at one point in the program's execution doesn't mean it won't be changed later to reference another object (though that would be admittedly perverse).
The Python interpreter should be giving you a full traceback of the exception; the first thing you need to do is find this. It could be occurring in one of two situations. (This is for single-threaded programs; I'm assuming your program is not multithreaded.)
During the execution of your program, in which case the program will be terminated by the exception, or
During finalization of objects (in their __del__(self) functions) in which case the error will be printed to stderr.
In both cases there should be a stack trace, not just the error message; I've confirmed that at least on Python ≥3.4 a stack trace is printed out for case 2.
You then need to follow this stack trace to see where the problem lies. Remember that the names you give to except ... are variables (even things like TypeError) that can be reassigned, so that you could conceivably be dealing with a (perverse) situation like:
TypeError = False
try:
...
except TypeError:
...
But more likely it will be something obvious such as:
class MyException: # Doesn't inherit from Exception
...
try:
...
except MyException:
...
There is one special case you need to be aware of: if you are seeing messages to stderr (case "2. During finalization," above) printed out as your program exits that means that the exception was thrown during cleanup as the interpreter shuts down, where random variables throughout the program may have already been set to None as part of the cleanup process. But in this case your program should still exit successfully.

SocketTimeoutException - "timeout" "read timed out"

I am writing tests which run OkHttp/Retrofit requests against a MockWebServer. Among other things I'm testing timeouts. Here I noticed, that some of my timeout tests do not produce the same kind of exception all the time:
While the exception thrown is always a SocketTimeoutException, the exception message differs between two possibilities. Sometimes I get
"timeout", sometimes
"Read timed out".
There seems to be no clear pattern (it's the very same test which sometimes produces one or the other of these exception messages).
I assume that different constellations/causes lead to the differing messages... Can somebody explain to me the difference between these two cases?
Here are the corresponding stack traces:
"Read timed out"
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:170)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at okio.Okio$2.read(Okio.java:140)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:238)
at okio.RealBufferedSource.read(RealBufferedSource.java:45)
at okhttp3.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:381)
at okio.RealBufferedSource.read(RealBufferedSource.java:45)
at okio.ForwardingSource.read(ForwardingSource.java:35)
at retrofit2.OkHttpCall$ExceptionCatchingRequestBody$1.read(OkHttpCall.java:279)
at okio.RealBufferedSource$1.read(RealBufferedSource.java:386)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at com.google.gson.stream.JsonReader.fillBuffer(JsonReader.java:1287)
at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1016)
at com.google.gson.stream.JsonReader.nextName(JsonReader.java:787)
at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:739)
at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714)
at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:910)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:37)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:25)
at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:117)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:106)
"timeout"
Caused by: java.net.SocketTimeoutException: timeout
at okio.Okio$3.newTimeoutException(Okio.java:212)
at okio.AsyncTimeout.exit(AsyncTimeout.java:288)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:242)
at okio.RealBufferedSource.read(RealBufferedSource.java:45)
at okhttp3.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:381)
at okio.RealBufferedSource.read(RealBufferedSource.java:45)
at okio.ForwardingSource.read(ForwardingSource.java:35)
at retrofit2.OkHttpCall$ExceptionCatchingRequestBody$1.read(OkHttpCall.java:279)
at okio.RealBufferedSource$1.read(RealBufferedSource.java:386)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at com.google.gson.stream.JsonReader.fillBuffer(JsonReader.java:1287)
at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1016)
at com.google.gson.stream.JsonReader.nextName(JsonReader.java:787)
at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:739)
at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714)
at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:910)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:37)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:25)
at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:117)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:106)

Fetch Update precondition failed

One week ago, Fetch method of Google.Apis.v2.DriveService.Files.Update throw exception 412 Precondition failed.
I had realize previous operation getting file using DocID. Later, I update this file without changes then I get this error message.
Errors [
Message[Precondition Failed] Location[If-Match - header] Reason[conditionNotMet] Domain[global] ]
Could you help me?

BeepBeep and ErlyDB integration issue

Further to my adventures with Erlang and ErlyDB. I am attempting to get ErlyDB working with BeepBeep
My ErlyDB setup works correctly when run outside of the BeepBeep environment (see Debugging ErlyDB and MySQL). I have basically take the working code and attempted to get it running inside BeepBeep.
I have the following code in my controller:
handle_request("index",[]) ->
erlydb:start(mysql,Database),
erlydb:code_gen(["thing.erl"],mysql),
NewThing = thing:new_with([{name, "name"},{value, "value"}]),
thing:save(NewThing),
{render,"home/index.html",[{data,"Hello World!"}]};
When I call the URL, the response outputs "Server Error".
There is no other error or exception information reported.
I have tried wrapping the call in try/catch to see if there is an underlying error - there is definitely an exception at the call to thing:new_with(), but no further information is available.
The stacktrace reports:
{thing,new,[["name","value"]]}
{home_controller,create,1}
{home_controller,handle_request,3}
{beepbeep,process_request,4}
{test_web,loop,1}
{mochiweb_http,headers,4}
{proc_lib,init_p_do_apply,3}
Use pattern matching to assert that things work up to the call to thing:new/1:
ok = erlydb:start(mysql,Database),
ok = erlydb:code_gen(["thing.erl"],mysql),
You include only the stack trace, look at the exception message as well. I suspect that the error is that you get an 'undef' exception. But check that it is so. The first line in the stack trace indicates that it is a problem with calling thing:new/1 with ["name", "value"] as argument.
It is slightly odd that you show one clause of handle_request that is not calling home_controller:create/1 as per {home_controller,create,1} in the stack-trace. What do the other clauses in your handle_request/2 function look like?