View Single Post
Old 07-14-2018, 09:54 AM   #217
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 145
Quote:
Originally Posted by kaykills View Post
Hey. This script is fantastic. Thank you. I am running into an issue trying to write to file. I get the following error :

Code:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal pattern character 'Y'
    at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:768)
    at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:575)
    at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:500)
    at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:475)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at com.manywords.softworks.ootpscheduler.OOTPScheduleFileWriter.writeScheduleFile(OOTPScheduleFileWriter.groovy:52)
    at com.manywords.softworks.ootpscheduler.OOTPScheduleFileWriter$writeScheduleFile.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at com.manywords.softworks.ootpscheduler.Main.run(Main.groovy:125)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
    at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:793)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:776)
    at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:394)
    at org.codehaus.groovy.runtime.InvokerHelper$runScript.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at com.manywords.softworks.ootpscheduler.Main.main(Main.groovy)
Not a java expert so not really sure how to get around it. I am running the .sh script on

Mac 10.12.6
Java 8 / 171

Sorry for taking so long to get back to you on this—I've been away from OOTP for a while.


I think this might happen if your system language setting is something other than English. The issue occurs in the code which generates the filename for the finished schedule.


I'm not quite sure how to fix it. I might just add a little configuration option to turn off the today's-date-based output file name.
Fishbreath is offline   Reply With Quote