explain.bat issue

144 views
Skip to first unread message

Greg W

unread,
Jan 4, 2017, 8:21:50 PM1/4/17
to Maxent
Hi,
I am using .csv files to look at lake point data and create predictions for an invasive species.  I have no problems running maxent on my mac (10.12.1) and getting the proper output files.  However, when I try to run the generated explain.bat script, it fails as it is looking for an .asc file that isn't produced.

I'm thinking this is the result of using .csv files instead of esri .asc files as an input, but I don't have access to arcGIS programs, so I'm using QGIS instead.

Any ideas?

Thanks,

GW


Robert Pace

unread,
Jan 6, 2017, 8:58:51 AM1/6/17
to Maxent
I don't think that macs can use batch files, as batch (.bat) files are a windows command scripting language.  The mac equivalent would be a bash script (.sh).  It shouldn't be to hard to convert the .bat to bash shell script (.sh).

Greg W

unread,
Jan 13, 2017, 7:02:02 PM1/13/17
to Maxent

Thanks,
I have a lot of years running linux scripts, so that isn't an issue.  The issue is that the script is looking for a file that Maxent isn't producing.

The .bat file itself is fine and will run properly if the file is found.  Here's the content of the file

jjava -mx1820m -cp "/Users/xxx/Desktop/GIS/maxent/maxent.jar:/Users/xxx/Desktop/GIS/maxent/maxent.jar" density.Explain -l "/Users/xxx/Desktop/Research/Table analysis/phab_a/Maxent Final replicates/Daphnia_lumholtzi_0.lambdas" "/Users/xxx/Desktop/Research/Table analysis/phab_a/Maxent Final replicates/Daphnia_lumholtzi_0.asc" "/Users/xxx/Desktop/Research/Table analysis/phab_a/Data/no lum phab_x.csv"

When the script is ran here is the result.

Error in file /Users/xxx/Desktop/Research/Table analysis/phab_a/Maxent Final replicates/Daphnia_lumholtzi_0.asc: java.io.FileNotFoundException: /Users/xxx/Desktop/Research/Table analysis/phab_a/Maxent Final replicates/Daphnia_lumholtzi_0.asc (No such file or directory)
Error: Error in file /Users/xxx/Desktop/Research/Table analysis/phab_a/Maxent Final replicates/Daphnia_lumholtzi_0.asc


I'ts looking for a file called Daphnia_lumholtzi_0.asc.  Below is a list of the directory (the xxx is the user name, replaced here for privacy reasons) and as you can see, it's not there.  Why it's no there is what I'm trying to figure out.

-rw-r--r--  1 xxx  staff   6073 Jan 13 17:30 Daphnia_lumholtzi_0_samplePredictions.csv
-rw-r--r--  1 xxx  staff    937 Jan 13 17:30 Daphnia_lumholtzi_0_sampleAverages.csv
-rw-r--r--  1 xxx  staff  13562 Jan 13 17:30 Daphnia_lumholtzi_0_omission.csv
-rw-r--r--  1 xxx  staff    450 Jan 13 17:30 Daphnia_lumholtzi_0_explain.bat
-rw-r--r--  1 xxx  staff  79721 Jan 13 17:30 Daphnia_lumholtzi_0_backgroundPredictions.csv
-rw-r--r--  1 xxx  staff   4361 Jan 13 17:30 Daphnia_lumholtzi_0.lambdas
-rw-r--r--  1 xxx  staff  48553 Jan 13 17:30 Daphnia_lumholtzi_0.csv
-rw-r--r--  1 xxx  staff  16251 Jan 13 17:31 Daphnia_lumholtzi_0.html


Thanks,

Greg W

Sancordar CA

unread,
Jan 14, 2017, 8:30:50 AM1/14/17
to max...@googlegroups.com
Linux here, I just copy the content of the .bat file and paste it in a terminal (console), I hope is the same on mac

--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+unsubscribe@googlegroups.com.
To post to this group, send email to max...@googlegroups.com.
Visit this group at https://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/d/optout.

Greg W

unread,
Jan 14, 2017, 1:31:53 PM1/14/17
to Maxent
Hi,
Thanks.  you can actually just sh the .bat file and it will run.  The issue isn't running the script, the issue is the missing file *.asc that it is needing to complete the script.  The file itself isn't being produced by Maxent.


On Saturday, January 14, 2017 at 7:30:50 AM UTC-6, Sancordar CA wrote:
Linux here, I just copy the content of the .bat file and paste it in a terminal (console), I hope is the same on mac
2017-01-06 8:58 GMT-05:00 Robert Pace <que...@gmail.com>:
I don't think that macs can use batch files, as batch (.bat) files are a windows command scripting language.  The mac equivalent would be a bash script (.sh).  It shouldn't be to hard to convert the .bat to bash shell script (.sh).


On Wednesday, January 4, 2017 at 8:21:50 PM UTC-5, Greg W wrote:
Hi,
I am using .csv files to look at lake point data and create predictions for an invasive species.  I have no problems running maxent on my mac (10.12.1) and getting the proper output files.  However, when I try to run the generated explain.bat script, it fails as it is looking for an .asc file that isn't produced.

I'm thinking this is the result of using .csv files instead of esri .asc files as an input, but I don't have access to arcGIS programs, so I'm using QGIS instead.

Any ideas?

Thanks,

GW


--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+un...@googlegroups.com.

Sancordar CA

unread,
Jan 14, 2017, 4:24:00 PM1/14/17
to max...@googlegroups.com
Oh, sorry for that, may be using the verbose option and running maxent form the terminal could give us more information?

To unsubscribe from this group and stop receiving emails from it, send an email to maxent+unsubscribe@googlegroups.com.

Greg W

unread,
Jan 14, 2017, 6:04:07 PM1/14/17
to Maxent
Hi,

I reran the command from the terminal (I always use verbose = TRUE).  Output was the same as running from the gui interface.  I've attached 2 files, one is the maxent.log, and the other is the text output on the terminal screen as the program ran.  I'm not seeing anything regarding the creation or non-creation of the .asc file needed for the explain script.

Having done this, I then did some more research and found this thread https://groups.google.com/d/msg/maxent/zUaclHI-_2U/MGQ6Vb1zAw8J
which talks about "... path to maxent.jar/path to prediction/folder containing the predictor grids."  As I don't really have any predictor grid (everything is a point location as I'm dealing with lakes, not things that can move like birds), I'm thinking perhaps this is why maxent isn't producing the .asc file, but then why is it creating a reference to one in the explain script?

Thanks,
maxent_log
terminal_output.txt

Greg W

unread,
Jan 14, 2017, 6:06:20 PM1/14/17
to Maxent
Oops,
Didn't realize that if I put .txt on the attachment, it could be viewed in the browser.  Here's the maxent_log.txt so you don't have to download it to look at it.
maxent_log.txt
Reply all
Reply to author
Forward
0 new messages