{"action":"created","issue":{"url":"https://api.github.com/repos/gama-platform/gama/issues/1826","repository_url":"https://api.github.com/repos/gama-platform/gama","labels_url":"https://api.github.com/repos/gama-platform/gama/issues/1826/labels{/name}","comments_url":"https://api.github.com/repos/gama-platform/gama/issues/1826/comments","events_url":"https://api.github.com/repos/gama-platform/gama/issues/1826/events","html_url":"https://github.com/gama-platform/gama/issues/1826","id":156546754,"number":1826,"title":"The relative path is not work well if the import model is not in the same project","user":{"login":"hqnghi88","id":6105384,"avatar_url":"https://avatars.githubusercontent.com/u/6105384?v=3","gravatar_id":"","url":"https://api.github.com/users/hqnghi88","html_url":"https://github.com/hqnghi88","followers_url":"https://api.github.com/users/hqnghi88/followers","following_url":"https://api.github.com/users/hqnghi88/following{/other_user}","gists_url":"https://api.github.com/users/hqnghi88/gists{/gist_id}","starred_url":"https://api.github.com/users/hqnghi88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hqnghi88/subscriptions","organizations_url":"https://api.github.com/users/hqnghi88/orgs","repos_url":"https://api.github.com/users/hqnghi88/repos","events_url":"https://api.github.com/users/hqnghi88/events{/privacy}","received_events_url":"https://api.github.com/users/hqnghi88/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gama-platform/gama/labels/%3E%20Bug","name":"> Bug","color":"ff0000"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-24T16:04:53Z","updated_at":"2016-05-24T17:27:21Z","closed_at":null,"body":"For example, I have 2 projects: P0 and TestRelativePath.\r\nIn the P0, i have model m1 working with the image.\r\nIn the TestRelativePath, i have model m2, import m1.\r\nWhen i click on the experiment exp1 of m1, i got this message\r\n\r\n!ENTRY org.eclipse.ui 4 4 2016-05-24 23:04:09.917\r\n!MESSAGE GamaRuntimeException File denoted by D:\\OneDrive\\Gama1.7\\TestRelativePath\\models2\\..\\images\\images\\soil.jpg not found! Tried the following paths : \r\n!STACK 0\r\nFile denoted by D:\\OneDrive\\Gama1.7\\TestRelativePath\\models2\\..\\images\\images\\soil.jpg not found! Tried the following paths : \r\n\tat msi.gama.common.util.FileUtils.constructAbsoluteFilePath(FileUtils.java:142)\r\n\tat msi.gama.common.util.ImageUtils.getImageFromFile(ImageUtils.java:82)\r\n\tat msi.gama.outputs.layers.ImageLayerStatement._init(ImageLayerStatement.java:147)\r\n\tat msi.gama.outputs.layers.AbstractLayerStatement.init(AbstractLayerStatement.java:78)\r\n\tat msi.gama.runtime.AbstractScope.init(AbstractScope.java:617)\r\n\tat msi.gama.outputs.LayeredDisplayOutput.init(LayeredDisplayOutput.java:264)\r\n\tat msi.gama.runtime.AbstractScope.init(AbstractScope.java:617)\r\n\tat msi.gama.outputs.AbstractOutputManager.init(AbstractOutputManager.java:157)\r\n\tat msi.gama.outputs.SimulationOutputManager.init(SimulationOutputManager.java:56)\r\n\tat msi.gama.kernel.simulation.SimulationAgent._init_(SimulationAgent.java:204)\r\n\tat msi.gama.metamodel.agent.MinimalAgent.init(MinimalAgent.java:173)\r\n\tat msi.gama.runtime.AbstractScope.init(AbstractScope.java:617)\r\n\tat msi.gama.metamodel.agent.AbstractAgent.schedule(AbstractAgent.java:396)\r\n\tat msi.gama.kernel.simulation.SimulationAgent.schedule(SimulationAgent.java:164)\r\n\tat msi.gama.kernel.simulation.SimulationPopulation.createAgents(SimulationPopulation.java:134)\r\n\tat msi.gama.kernel.experiment.ExperimentAgent.createSimulation(ExperimentAgent.java:228)\r\n\tat msi.gama.kernel.experiment.ExperimentAgent._init_(ExperimentAgent.java:187)\r\n\tat msi.gama.metamodel.agent.MinimalAgent.init(MinimalAgent.java:173)\r\n\tat msi.gama.kernel.experiment.ExperimentAgent.init(ExperimentAgent.java:196)\r\n\tat msi.gama.runtime.AbstractScope.init(AbstractScope.java:617)\r\n\tat msi.gama.kernel.experiment.ExperimentScheduler.schedule(ExperimentScheduler.java:172)\r\n\tat msi.gama.kernel.experiment.ExperimentAgent.schedule(ExperimentAgent.java:258)\r\n\tat msi.gama.kernel.experiment.ExperimentPlan.open(ExperimentPlan.java:331)\r\n\tat msi.gama.kernel.experiment.ExperimentController$1.run(ExperimentController.java:101)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nGAMA Caught a workbench message : GamaRuntimeException File denoted by D:\\OneDrive\\Gama1.7\\TestRelativePath\\models2\\..\\images\\images\\soil.jpg not found! Tried the following paths :  File denoted by D:\\OneDrive\\Gama1.7\\TestRelativePath\\models2\\..\\images\\images\\soil.jpg not found! Tried the following paths : \r\nFile denoted by D:\\OneDrive\\Gama1.7\\TestRelativePath\\models2\\..\\images\\images\\soil.jpg not found! Tried the following paths : \r\n\tat msi.gama.common.util.FileUtils.constructAbsoluteFilePath(FileUtils.java:142)\r\n\tat msi.gama.common.util.ImageUtils.getImageFromFile(ImageUtils.java:82)\r\n\tat msi.gama.outputs.layers.ImageLayerStatement._init(ImageLayerStatement.java:147)\r\n\tat msi.gama.outputs.layers.AbstractLayerStatement.init(AbstractLayerStatement.java:78)\r\n\tat msi.gama.runtime.AbstractScope.init(AbstractScope.java:617)\r\n\tat msi.gama.outputs.LayeredDisplayOutput.init(LayeredDisplayOutput.java:264)\r\n\tat msi.gama.runtime.AbstractScope.init(AbstractScope.java:617)\r\n\tat msi.gama.outputs.AbstractOutputManager.init(AbstractOutputManager.java:157)\r\n\tat msi.gama.outputs.SimulationOutputManager.init(SimulationOutputManager.java:56)\r\n\tat msi.gama.kernel.simulation.SimulationAgent._init_(SimulationAgent.java:204)\r\n\tat msi.gama.metamodel.agent.MinimalAgent.init(MinimalAgent.java:173)\r\n\tat msi.gama.runtime.AbstractScope.init(AbstractScope.java:617)\r\n\tat msi.gama.metamodel.agent.AbstractAgent.schedule(AbstractAgent.java:396)\r\n\tat msi.gama.kernel.simulation.SimulationAgent.schedule(SimulationAgent.java:164)\r\n\tat msi.gama.kernel.simulation.SimulationPopulation.createAgents(SimulationPopulation.java:134)\r\n\tat msi.gama.kernel.experiment.ExperimentAgent.createSimulation(ExperimentAgent.java:228)\r\n\tat msi.gama.kernel.experiment.ExperimentAgent._init_(ExperimentAgent.java:187)\r\n\tat msi.gama.metamodel.agent.MinimalAgent.init(MinimalAgent.java:173)\r\n\tat msi.gama.kernel.experiment.ExperimentAgent.init(ExperimentAgent.java:196)\r\n\tat msi.gama.runtime.AbstractScope.init(AbstractScope.java:617)\r\n\tat msi.gama.kernel.experiment.ExperimentScheduler.schedule(ExperimentScheduler.java:172)\r\n\tat msi.gama.kernel.experiment.ExperimentAgent.schedule(ExperimentAgent.java:258)\r\n\tat msi.gama.kernel.experiment.ExperimentPlan.open(ExperimentPlan.java:331)\r\n\tat msi.gama.kernel.experiment.ExperimentController$1.run(ExperimentController.java:101)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n[testcase.zip](https://github.com/gama-platform/gama/files/279917/testcase.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/gama-platform/gama/issues/comments/221344423","html_url":"https://github.com/gama-platform/gama/issues/1826#issuecomment-221344423","issue_url":"https://api.github.com/repos/gama-platform/gama/issues/1826","id":221344423,"user":{"login":"AlexisDrogoul","id":579256,"avatar_url":"https://avatars.githubusercontent.com/u/579256?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexisDrogoul","html_url":"https://github.com/AlexisDrogoul","followers_url":"https://api.github.com/users/AlexisDrogoul/followers","following_url":"https://api.github.com/users/AlexisDrogoul/following{/other_user}","gists_url":"https://api.github.com/users/AlexisDrogoul/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexisDrogoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexisDrogoul/subscriptions","organizations_url":"https://api.github.com/users/AlexisDrogoul/orgs","repos_url":"https://api.github.com/users/AlexisDrogoul/repos","events_url":"https://api.github.com/users/AlexisDrogoul/events{/privacy}","received_events_url":"https://api.github.com/users/AlexisDrogoul/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T17:27:20Z","updated_at":"2016-05-24T17:27:20Z","body":"That's usually what projects are made for. They keep resources and make them available to the models.\r\nBut are you talking about projects or folders ?  Because your error seems a bit different: is the path `D:\\OneDrive\\Gama1.7\\TestRelativePath\\models2..\\images\\images\\soil.jpg` correct on Windows ? Especially the part `\\models2..\\images\\` ? Shouldn't it be `\\models2\\..\\images\\` instead ??"}}
{"actor":{"display_login":"AlexisDrogoul"}}