title: Networkx graph_from_place: no path between pair of point, how to solve?
body: <p>When I create a networkx graph from OSM (of Turin, Italy), and I try to run the shortest path between different pairs of nodes. It said that there is no path. I have checked and among most pairs of points, there are no paths. How is it possible since I have downloaded the graph from OSM and a node is a junction between two edges?</p>
  
  <pre><code>G = ox.graph_from_place('Torino, Italy')
  nodi=[]
  for i in G.nodes():
     nodi.append(i)
  
  print(len(nodi))
  print(len(G.edges()))
  
  false=0
  true=0
  for i in nodi:
    for j in nodi:
      if i!=j:
        a=G.has_edge(i, j)
        if a==False:
          false+=1
        if a==True:
          true+=1
  
  print(false)
  print(true)
  
  
  24976
  62072
  
  623714119
  61481
  </code></pre>
  
  <p>When I run the shortest path, this is the error. In the example below I selected some origin and destination from an excel.</p>
  
  <pre><code>df=pd.read_excel('Ori_Ex.xlsx')
  origin=[]
  
  for index, row in df.iterrows():
  
     lat=row['lat']
     lon=row['lon']
     origin_point=(lat,lon)
     origin_node = ox.get_nearest_node(G, origin_point) 
     origin.append(origin_node)
  
  done=[]
  
  for i in origin: 
      orig=i
      for j in origin:
          if orig!=j:
              check = j+orig
              if check not in done:
                 done.append(check)
                 dest=j
                 path=nx.shortest_path(G, source = orig, target=dest, weight = 'length')
  
                 print('ok')
  
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  ok
  
  ---------------------------------------------------------------------------
  
  KeyError                                  Traceback (most recent call last)
  
  /usr/local/lib/python3.6/dist-packages/networkx/algorithms/shortest_paths/weighted.py in multi_source_dijkstra(G, sources, target, cutoff, weight)
      743     try:
  --&gt; 744         return (dist[target], paths[target])
      745     except KeyError:
  
  KeyError: 262294804
  
  
  During handling of the above exception, another exception occurred:
  
  NetworkXNoPath                            Traceback (most recent call last)
  
  4 frames
  
  /usr/local/lib/python3.6/dist-packages/networkx/algorithms/shortest_paths/weighted.py in multi_source_dijkstra(G, sources, target, cutoff, weight)
      744         return (dist[target], paths[target])
      745     except KeyError:
  --&gt; 746         raise nx.NetworkXNoPath("No path to {}.".format(target))
      747 
      748 
  
  NetworkXNoPath: No path to 262294804.
  
  
  
  </code></pre>