Describe the bug
When using the save statement with binary format I have an I/O error:
1 occurence in a0 at cycle 0: Java error: I/O error
in a0
in agent a0
in save simulation format: 'binary' to: 'sim.bin' ;
NoSuchFileException: D:\GamaTraining2024-OUCRU\TrainingModels\models\sim.bin
java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:484)
java.base/java.nio.file.Files.newOutputStream(Files.java:228)
gama.extension.serialize.binary.BinarySerialisation.saveToFile(BinarySerialisation.java:202)
in save simulation format: 'binary' to: 'sim.bin' ;
in init {
save simulation format: 'binary' to: 'sim.bin' ;
write i ;
}
So there are two problems:
The other formats do not require the file to initially exists (and I don't see why any format would require that)
The error arose even if the file already exists
To Reproduce
Steps to reproduce the behavior:
Run this model:
model testrestore
global {
init r {
}
}
experiment a {
init {
save simulation to: 'sim.bin' format:"binary";
write i;
}
}
5. See error
**Expected behavior**
I can create a file with the binary format like with any other format.
Describe the bug When using the save statement with binary format I have an I/O error:
So there are two problems:
To Reproduce Steps to reproduce the behavior:
global { init r { }
}
experiment a {
}