You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Users\anufr\miniconda3\envs\r5py\python.exe C:\Users\anufr\PycharmProjects\data_generation\hello_world.py
Traceback (most recent call last):
File "OSM.java", line 207, in com.conveyal.osmlib.OSM.readFromFile
java.io.java.io.FileNotFoundException: java.io.FileNotFoundException: C:\Users\anufr\AppData\Local\Temp\r5py31qtocm0\TransportNetwork_1a6352887a0_0087ca0\data_generation (Access is denied)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "OSM.java", line 207, in com.conveyal.osmlib.OSM.readFromFile
java.lang.java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: C:\Users\anufr\AppData\Local\Temp\r5py31qtocm0\TransportNetwork_1a6352887a0_0087ca0\data_generation (Access is denied)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "OSM.java", line 210, in com.conveyal.osmlib.OSM.readFromFile
Exception: Java Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\anufr\PycharmProjects\data_generation\hello_world.py", line 4, in
transport_network = r5py.TransportNetwork(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anufr\miniconda3\envs\r5py\Lib\site-packages\r5py\r5\transport_network.py", line 62, in init
osm_file.readFromFile(f"{osm_pbf}")
java.lang.java.lang.RuntimeException: java.lang.RuntimeException: Error occurred while parsing OSM file C:\Users\anufr\AppData\Local\Temp\r5py31qtocm0\TransportNetwork_1a6352887a0_0087ca0\data_generation
Exception ignored in: <function TransportNetwork.del at 0x000001A6355F6480>
Traceback (most recent call last):
File "C:\Users\anufr\miniconda3\envs\r5py\Lib\site-packages\r5py\r5\transport_network.py", line 101, in del
self.osm_file.close()
^^^^^^^^^^^^^
AttributeError: 'TransportNetwork' object has no attribute 'osm_file'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
I've found this to be an issue with the provided sample data - the cached path doesn't seem to be stored in the SampleDataSet directly when the sample data module is initially imported. Using r5py.sampledata.helsinki.osm_pbf.cached_path and similar works as a workaround though.
Thanks for this bug report. This should have been fixed in PR #410 and will work in the next release. In the meantime, using trunk r5py (install with pip install git+https://github.com/r5py/r5py.git) is a workaround
code:
import r5py
import r5py.sampledata.helsinki
transport_network = r5py.TransportNetwork(
r5py.sampledata.helsinki.osm_pbf,
[r5py.sampledata.helsinki.gtfs],
)
output:
C:\Users\anufr\miniconda3\envs\r5py\python.exe C:\Users\anufr\PycharmProjects\data_generation\hello_world.py
Traceback (most recent call last):
File "OSM.java", line 207, in com.conveyal.osmlib.OSM.readFromFile
java.io.java.io.FileNotFoundException: java.io.FileNotFoundException: C:\Users\anufr\AppData\Local\Temp\r5py31qtocm0\TransportNetwork_1a6352887a0_0087ca0\data_generation (Access is denied)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "OSM.java", line 207, in com.conveyal.osmlib.OSM.readFromFile
java.lang.java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: C:\Users\anufr\AppData\Local\Temp\r5py31qtocm0\TransportNetwork_1a6352887a0_0087ca0\data_generation (Access is denied)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "OSM.java", line 210, in com.conveyal.osmlib.OSM.readFromFile
Exception: Java Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\anufr\PycharmProjects\data_generation\hello_world.py", line 4, in
transport_network = r5py.TransportNetwork(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anufr\miniconda3\envs\r5py\Lib\site-packages\r5py\r5\transport_network.py", line 62, in init
osm_file.readFromFile(f"{osm_pbf}")
java.lang.java.lang.RuntimeException: java.lang.RuntimeException: Error occurred while parsing OSM file C:\Users\anufr\AppData\Local\Temp\r5py31qtocm0\TransportNetwork_1a6352887a0_0087ca0\data_generation
Exception ignored in: <function TransportNetwork.del at 0x000001A6355F6480>
Traceback (most recent call last):
File "C:\Users\anufr\miniconda3\envs\r5py\Lib\site-packages\r5py\r5\transport_network.py", line 101, in del
self.osm_file.close()
^^^^^^^^^^^^^
AttributeError: 'TransportNetwork' object has no attribute 'osm_file'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: