Hi,
After running simulation i got an error reading the
resulting tar file with the DatanetAPI iterator.
File "RouteNet_Fermi/datanetAPI.py", line 805, in
__iter__
results_file = tar.extractfile(
dir_info.name+"/simulationResults.txt")
File ".conda/envs/gnnch/lib/python3.9/tarfile.py", line
2113, in extractfile
tarinfo = self.getmember(member)
File ".conda/envs/gnnch/lib/python3.9/tarfile.py", line
1799, in getmember
raise KeyError("filename %r not found" % name)
KeyError: "filename
'results_2022-10-03__23-42-06__hard3_lbw_from_traffic-above_bsz_small_2_avgbw_large_1_netsz_10_100x1_p_0.5_29_0_0//simulationResults.txt'
not found"
But the file simulationResults.txt is present in the
tarfile.
The reason seems to be that tarfile library adds a slash /
character at the end of
dir_info.name when the name is
over 100 characters. And since DatanetAPI code adds a '/' when
calling extractfile, this results in double slash which is
apparently invalid.
I fixed the error locally in datanetAPI.py by checking if
the directory name has / at the end and if yes, to remove it.
But i would appreciate it if you update your API so that the
samples we submit that have long dir names could still be
opened on your end.
Thanks