Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-01-2020 04:18 AM
Hi,
I am using desktop version of Neo4j 4.0.3 with GDS and APOC (apoc-4.0.0.12-all.jar & apoc-nlp-dependencies-4.0.0.12.jar) plugins.
I issue following command in Cypher
MATCH (a:Article {uri: "https://neo4j.com/blog/pokegraph-gotta-graph-em-all/"})
CALL apoc.nlp.gcp.entities.stream(a, {
key: '',
nodeProperty: "body"
})
YIELD value
UNWIND value.entities AS entity
RETURN entity;
Whenever I execute the above command, I receive the following error:
Failed to invoke procedure apoc.nlp.gcp.entities.stream
: Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://language.googleapis.com/v1/documents:analyzeEntities?key=
I have the API key setup in my project and also enabled services in GCP project
NAME TITLE
endpoints.googleapis.com Google Cloud Endpoints
servicecontrol.googleapis.com Service Control API
servicemanagement.googleapis.com Service Management API
Please help in resolving the above issue.
Thanks & Regards,
Rajeev
06-05-2020 07:21 AM
I think that error code is an auth based one. Is the key that it shows in the error message the one that you expect to see?
11-07-2020 11:55 AM
Maybe check if the api key you are using has any set limitations?
I am encountering a somewhat similar issue, but mine is 400 error code. The query runs OK every now and then, So i am sure that the apikey is correct. But every so often, i get the error message:
"Failed to invoke procedure apoc.nlp.gcp.entities.stream
: Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://language.googleapis.com/v1/documents:analyzeEntities?
Anyone with clue as to what I need to do to fix this?
11-07-2020 06:34 PM
Update:
the string that was triggering the errors:
"General Medicine"
"Molecular Medicine"
I replaced the " " with a "-" in front of "Medicine" and the HTTP 400 error went away:
trim(toUpper(replace(n.Title," Medicine","-Medicine" )))
Weird!!
11-23-2020 03:11 AM
Do you mean having those phrases in the node property that you're analyzing causes the error? That sounds very weird, I'd like to investigate it so that we can sort it out
11-26-2020 08:32 AM
Failed to invoke procedure apoc.nlp.gcp.entities.stream
: Caused by: java.io.IOException: Server returned HTTP response code: 400
i do have a same issue can any one help me with this
11-26-2020 01:32 PM
Is it repeatable? Can you share the data/query that resulted in that error?
12-04-2020 02:50 AM
MATCH (a:Article {uri: "https://neo4j.com/blog/pokegraph-gotta-graph-em-all/"})
CALL apoc.nlp.gcp.entities.graph(a, {
key: $apiKey,
nodeProperty: "body",
writeRelationshipType: "ENTITY"
})
YIELD graph AS g
RETURN g;
12-04-2020 07:40 AM
Oh that's strange. I just created a new guide showing how to use the procedures so I have tested out something very similar to that query - https://neo4j.com/developer/graph-data-science/nlp/entity-extraction/
Does your API key definitely have all the required permissions?
12-11-2020 08:58 AM
yes i do can u please help me with creating the relation between the nodes dynamicaly for a given text and also i dint get same version of graphware nlp's in the git hub i need 3.5.1 version of standford nlp can u me help me with this please..
12-15-2020 08:33 AM
Hi Mark,
I have the same error as rajeev1.s
Failed to invoke procedure apoc.nlp.gcp.entities.stream
: Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://language.googleapis.com/v1/documents:analyzeEntities?key=(key here)
However, I it is unclear which permissions the API key needs to have. I'm following this tutorial (https://neo4j.com/developer/graph-data-science/build-knowledge-graph-nlp-ontologies/) and the explanation is quite brief (Assuming that we’re already created a GCP account, we can generate a key by following the instructions at console.cloud.google.com/apis/credentials). Could you provide me with the steps necessary to check if the API key has all the required permissions?
For now, I don't have any restrictions.
Thanks,
Rose
03-11-2021 04:59 AM
@rosemary.thatsme I had the same issue. Try visiting https://console.developers.google.com/apis/api/language.googleapis.com/overview?project=YOUR-GCP-PROJECT-ID to enable it.
(Below is how I figured that out, by calling the GCP natural language API from the command line)
$ curl -XPOST 'https://language.googleapis.com/v1/documents:analyzeEntities?key=MY-API-KEY
{
"error": {
"code": 403,
"message": "Cloud Natural Language API has not been used in project *MY-PROJECT-ID* before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/language.googleapis.com/overview?project=*MY-PROJECT-ID* then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/language.googleapis.com/overview?project=*MY-PROJECT-ID*"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"consumer": "projects/*MY-PROJECT-ID*",
"service": "language.googleapis.com"
}
}
]
}
}
After enabling it, I was able to continue with the Neo4j tutorial (Tutorial: Build a Knowledge Graph using NLP and Ontologies - Developer Guides)
06-06-2022 12:11 AM - edited 06-06-2022 12:16 AM
Hi,
I am using desktop version of Neo4j 4.4.7 with (apoc-4.4.0.5.jar & apoc-nlp-dependencies-4.0.0.18.jar & n10s-4.4.0.1.jar & graph-data-science-2.0.4.jar & neo4j-jwt-addon-1.2.0.jar) plugins.
When I execute following Cypher code:
09-14-2022 03:43 PM
same issue here, it seems that this problem hasn't been solved for two years..
All the sessions of the conference are now available online