Comments (4)
Please update to latest version of langchain_community, because I used python version 3.12.4
and faced no error when executing the below code:
from langchain_community.graphs import Neo4jGraph
graph = Neo4jGraph()
# Import movie information
movies_query = """
LOAD CSV WITH HEADERS FROM
'https://raw.githubusercontent.com/tomasonjo/blog-datasets/main/movies/movies_small.csv'
AS row
MERGE (m:Movie {id:row.movieId})
SET m.released = date(row.released),
m.title = row.title,
m.imdbRating = toFloat(row.imdbRating)
FOREACH (director in split(row.director, '|') |
MERGE (p:Person {name:trim(director)})
MERGE (p)-[:DIRECTED]->(m))
FOREACH (actor in split(row.actors, '|') |
MERGE (p:Person {name:trim(actor)})
MERGE (p)-[:ACTED_IN]->(m))
FOREACH (genre in split(row.genres, '|') |
MERGE (g:Genre {name:trim(genre)})
MERGE (m)-[:IN_GENRE]->(g))
"""
graph.query(movies_query)
from langchain.
Thanks for the response @keenborder786 .
But I still face the same issue. I use langchain_community v0.2.4 (which is the latest as of now).
Here are some more details that might help.
Python v3.12.4 (I used the one from Microsoft Store and later with the one downloaded from https://www.python.org/downloads/release/python-3124/. I hope this shouldn't make a difference. But sharing here as I tried both)
OS: Windows 10
IDE: Visual Studio Code
Virtual environment: venv
The requirements.txt file I use has the following content:
python-dotenv==1.0.1
langchain==0.2.3
langchain-community==0.2.4
langchain-openai==0.1.8
neo4j==5.20.0
Important note: Everything works fine if I use Python v3.11.7 instead of Python v3.12.4.
from langchain.
@tamilselvanav can you try python 3.12.3
from langchain.
@keenborder786 : Yes, I tried and the same code works fine with Python v3.12.3
from langchain.
Related Issues (20)
- ChatGoogleGenerativeAI does not support streaming HOT 2
- ChatHuggingFace using local model with HuggingFacePipeline wrongly checks for available inference endpoints HOT 7
- I am getting this error HOT 4
- Prepare for pydantic 2 migration by refactoring vanilla @root_validator() usage HOT 1
- DOC: <Issue related to /v0.2/docs/tutorials/rag/> HOT 11
- Add Document ID back to AzureSearch Documents HOT 1
- Spec out API for all required vs. all possible input variables HOT 2
- RedisChatMessageHistory encountering issues in Redis standalone mode on Windows.
- Standardize DocumentLoader docstrings and integration docs
- Standardize DocumentLoader docstrings and integration do HOT 1
- When using langchain-community, some PDF images will report errors during OCR
- [E:onnxruntime:Default, env.cc:228 ThreadMain] pthread_setaffinity_np failed for thread: 8353, index: 0, mask: {1, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.
- RPC error: [create_index], <MilvusException: (code=1100, message=create index on 104 field is not supported: invalid parameter[expected=supported field][actual=create index on 104 field])>, <Time:{'RPC start': '2024-06-14 13:38:35.242645', 'RPC error': '2024-06-14 13:38:35.247294'}> HOT 1
- DOC: <Issue related to /v0.2/docs/integrations/chat/> Ollama JSON mode seems to be marked incorrectly as NO HOT 1
- MistralAI Extraction How-To (with examples) throws an error HOT 2
- Wrong spell in DOC: <Issue related to /v0.2/docs/how_to/streaming/>
- httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol
- Failed to parse Suggestions from completion HOT 2
- Invalid Milvus URI when using Milvus lite with local DB HOT 1
- Cannot import name 'create_model' from 'langchain_core.runnables.utils' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langchain.