I have py2neo version 3.1.2 installed on python 3.5 and when I run the following code, I receive a deprecation warning about Graph.find_one and am told to use NodeSelector instead. v3 Documentation doesn't mention this depreciation. When I go to use the NodeSelector method in the code below I end up with many duplicate calendar nodes all linked to a single event node. How do I update my code to prevent this warning?
There are already a number of calendar nodes on my graph. I want this to go through this dictionary and append them to the graph and relate them to the appropriate calendar node.
for k,v in calendar_dict.items():
calendar = graph.find_one("Calendar", property_key='url', property_value=v)
calendar_event = Node("CalendarEvent", event=k, date=str(v))
calendar_rel = Relationship(calendar_event, "POSTED_ON", calendar,
/home/mcamp/anaconda3/envs/py3.5/lib/python3.5/site-packages/ipykernel/__main__.py:2: DeprecationWarning: Graph.find_one is deprecated, use NodeSelector instead
from ipykernel import kernelapp as app