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
I am trying to use the downloaded synthea jar file (v3.1.1) on Windows 11 Pro with Java version 11.0.16.1 and modifying the following demographic files:
demographics.default_file
geography.zipcodes.default_file
geography.timezones.default_file
geography.sdoh.default_file
When I try passing in params like:
java -jar synthea-with-dependencies.jar -p 10 --generate.demographics.default_file="C:\test\modified_demographics.csv"
I get the following errors:
ERROR: unable to load demographics
java.lang.IllegalArgumentException: resource C:\test\modified_demographics.csv not found.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
at com.google.common.io.Resources.getResource(Resources.java:198)
at org.mitre.synthea.engine.Generator.init(Generator.java:226)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:208)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:184)
at App.main(App.java:229)
Caused by: java.lang.IllegalArgumentException: resource C:\test\modified_demographics.csv not found.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
at com.google.common.io.Resources.getResource(Resources.java:198)
at org.mitre.synthea.helpers.Utilities.readResource(Utilities.java:410)
at org.mitre.synthea.world.geography.Demographics.load(Demographics.java:388)
at org.mitre.synthea.world.geography.Location.<init>(Location.java:64)
at org.mitre.synthea.engine.Generator.init(Generator.java:226)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:208)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:184)
at App.main(App.java:229)
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.mitre.synthea.world.geography.Location.<init>(Location.java:102)
at org.mitre.synthea.engine.Generator.init(Generator.java:226)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:208)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:184)
at App.main(App.java:229)
Caused by: java.lang.IllegalArgumentException: resource C:\test\modified_demographics.csv not found.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
at com.google.common.io.Resources.getResource(Resources.java:198)
at org.mitre.synthea.helpers.Utilities.readResource(Utilities.java:410)
at org.mitre.synthea.world.geography.Demographics.load(Demographics.java:388)
at org.mitre.synthea.world.geography.Location.<init>(Location.java:64)
... 4 more
I have tried adding the modified demographics files to the same folder as the jar file, switch the direction of the slashes, with and without quotes around the file path, etc. The wiki for common configurations doesn't include non-boolean examples and the examples for other geographic areas assume you have cloned the repo rather than use the jar file.
I am able to generate the correct files when I clone the full repo and modify the synthea.properties file.
Has anyone able to use modified demographic files with the jar download successfully?
Environment
- OS: Windows 11 Pro
- Java: 11.0.16.1
Relevant log output
ERROR: unable to load demographics
java.lang.IllegalArgumentException: resource C:\test\modified_demographics.csv not found.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
at com.google.common.io.Resources.getResource(Resources.java:198)
at org.mitre.synthea.engine.Generator.init(Generator.java:226)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:208)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:184)
at App.main(App.java:229)
Caused by: java.lang.IllegalArgumentException: resource C:\test\modified_demographics.csv not found.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
at com.google.common.io.Resources.getResource(Resources.java:198)
at org.mitre.synthea.helpers.Utilities.readResource(Utilities.java:410)
at org.mitre.synthea.world.geography.Demographics.load(Demographics.java:388)
at org.mitre.synthea.world.geography.Location.<init>(Location.java:64)
at org.mitre.synthea.engine.Generator.init(Generator.java:226)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:208)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:184)
at App.main(App.java:229)
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.mitre.synthea.world.geography.Location.<init>(Location.java:102)
at org.mitre.synthea.engine.Generator.init(Generator.java:226)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:208)
at org.mitre.synthea.engine.Generator.<init>(Generator.java:184)
at App.main(App.java:229)
Caused by: java.lang.IllegalArgumentException: resource C:\test\modified_demographics.csv not found.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
at com.google.common.io.Resources.getResource(Resources.java:198)
at org.mitre.synthea.helpers.Utilities.readResource(Utilities.java:410)
at org.mitre.synthea.world.geography.Demographics.load(Demographics.java:388)
at org.mitre.synthea.world.geography.Location.<init>(Location.java:64)
... 4 more
The text was updated successfully, but these errors were encountered:
Thanks for reporting this -- as I look at it now we do have different types of configuration options referring to files. Some like this one, are "resources" which are required to be under the src/main/resources folder, others can be anywhere on the file system, and that difference isn't apparent to a user. I'll take a look and see if there's any reason we can't make any configuration file able to be located anywhere
Hi @m-goggins , apologies for the delay here. We merged #1226 recently which should allow all files pointed to in config settings to either be relative to src/main/resources or an absolute path to anywhere on the file system. Let us know if you encounter any issues
Incredible! I saw that merge and started using it last week; no issues so far. I appreciate the work you and the rest of the dev team have done on it @dehall
What happened?
Hello!
I am trying to use the downloaded synthea jar file (v3.1.1) on Windows 11 Pro with Java version 11.0.16.1 and modifying the following demographic files:
demographics.default_file
geography.zipcodes.default_file
geography.timezones.default_file
geography.sdoh.default_file
When I try passing in params like:
java -jar synthea-with-dependencies.jar -p 10 --generate.demographics.default_file="C:\test\modified_demographics.csv"
I get the following errors:
I have tried adding the modified demographics files to the same folder as the jar file, switch the direction of the slashes, with and without quotes around the file path, etc. The wiki for common configurations doesn't include non-boolean examples and the examples for other geographic areas assume you have cloned the repo rather than use the jar file.
I am able to generate the correct files when I clone the full repo and modify the synthea.properties file.
Has anyone able to use modified demographic files with the jar download successfully?
Environment
Relevant log output
The text was updated successfully, but these errors were encountered: