Osmnx.graph_from_place InvalidChunkLength

I use osmnx.graph_from_place to load graph from .osm.pbf file. The code works for most U.S. states but Texas. When I tried to process Texas data with graph_from_place function, it always gives the error: InvalidChunkLength: InvalidChunkLength(got length b’‘, 0 bytes read); ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b’‘, 0 bytes read)", InvalidChunkLength(got length b’', 0 bytes read)). I think there must be something wrong in the server. Does anybody have the solution?

I also tried to use pyrosm.get_network function to retrieve the .osm.pbf file for Texas in order to concert it to geodataframe, but ran out of memory.

Another way I’ve tried is using osm2pgsql to load .osm.pbf file directly to postgresql but the data format is different from what I could get using get_network or graph_from_place function. Anyone knows which style file I should use to extract the exactly same data format as I get from get_network or graph_from_place.

osm2pgsql doesn’t form a graph, and is, in general, not something you want for routing applications like osmnx does. You should report this bug to the osmnx issue tracker.

Thanks! I just run to get the data using graph_from_place function, but it took almost 2 hours. Don’t know why it works this time and takes extreme longer than other states even though the data size is not significantly larger. will report the issue.