gama.old icon indicating copy to clipboard operation
gama.old copied to clipboard

issue in saving a CSV file

Open rwwda opened this issue 3 years ago • 5 comments

Hello,

I was writing a code in GAMA on the university's computer and I wanted to save some data in a CSV file and it worked but when I run the same exact code on my laptop Mac OS it stops at a certain cycle and an error appears.

Screen Shot 2022-06-23 at 12 45 57 PM

log.zip

GAMA Platform - V1.8.2

Thank you

rwwda avatar Jun 24 '22 09:06 rwwda

Hi,

Can you share your model and the log that corresponds to your bug ? Because it seems that the error in different in the log and in the UI.

Thanks Alexis

AlexisDrogoul avatar Jun 24 '22 16:06 AlexisDrogoul

Hi,

here is the model ninepatchesJune22 copy.gaml.zip

and here is the excel file i used for the patches, Matrix9P.csv

when i run the code, and then play the simulation, everything works fine, but it always stops at cycle 7371

About the log, would you inform me how to find it?

Thanks, Rawdha

rwwda avatar Jun 25 '22 19:06 rwwda

Here's the error

1 occurence in Simulation_ABM_EBM0 at cycle 7371: Java error: illegal argument in save R0_local to: 'R0_local_11-4.csv' type: csv ; IllegalArgumentException: Path must include project and resource name: /R0_local_11-4.csv org.eclipse.core.runtime.Assert.isLegal(Assert.java:66) org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2145) org.eclipse.core.internal.resources.Container.getFile(Container.java:196) msi.gama.common.util.FileUtils.findInWorkspace(FileUtils.java:187) msi.gama.common.util.FileUtils.constructAbsoluteFilePath(FileUtils.java:161) msi.gaml.statements.SaveStatement.privateExecuteIn(SaveStatement.java:377) msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46) in agent Simulation_ABM_EBM0

rwwda avatar Jun 25 '22 20:06 rwwda

Hi,

The fact that it stops at step 7371 is quite logical as there is a reflex called endSim that is triggered by (cycle = dayInSim), where dayInSim equals 7371. This is the reflex that stops the simulation (actually kills it).

However, I can't reproduce your problem: on my computer (also on macOS), everything is saved fine in the respective .csv files. Same on Windows. Do you still get the error ?

Alexis

AlexisDrogoul avatar Jul 09 '22 04:07 AlexisDrogoul

Hi,

yes, I'm still getting the same exact error, I guess I have to install a certain plugin for it to work? and if it's okay can you share the .csv files to check on them?

Rawdha

rwwda avatar Jul 09 '22 08:07 rwwda