Barrier Mapper Errors on Line 241 and 583

212 views
Skip to first unread message

Brody

unread,
Jan 14, 2024, 2:35:39 AM1/14/24
to Linkage Mapper
Hello,

I'm trying to run Barrier Mapper, but I keep coming across an error on line 241. This triggers multiple attempts to execute (Focal Statistics) before ultimately failing and giving an error on line 583. Linkage pathways and pinch-point mapper work perfectly fine.

I've attached the log file below, and I'm looking forward to your response.

Cheers,
Brody

2024_01_13_1620_Barrier mapper.txt

John Gallo

unread,
Jan 14, 2024, 8:58:40 PM1/14/24
to linkage...@googlegroups.com
Having the minimum radius be the same length as the width of the raster cell may be causing the problem.  Try someting bigger (e.g. radius 60, max 300, and increment of 240 as your settings.)

--
You received this message because you are subscribed to the Google Groups "Linkage Mapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linkage-mappe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linkage-mapper/1b08e56d-e5a2-4bd7-835a-9f0b1abde042n%40googlegroups.com.


--
John A. Gallo, Ph.D.
Project Director
LinkageMapper.org

and

Senior Conservation Scientist
Conservation Biology Institute

Brody

unread,
Jan 15, 2024, 1:44:15 AM1/15/24
to Linkage Mapper
Hello,

I tried your recommendation of radius 60, max 300, and increment of 240, but got the same results. 

2024_01_14_2034_Barrier mapper.txt

John Gallo

unread,
Jan 15, 2024, 4:25:51 PM1/15/24
to linkage...@googlegroups.com
Hi Brody,

Hmm, it is a challenging one.  Let's email directly and let's remember to report out when we get it solved. I'll send you a message now.

Thanks,

John

Jie Su

unread,
Jan 15, 2024, 9:23:47 PM1/15/24
to Linkage Mapper
Hello Brody,

 I see, you must change the name and datatype of your resistance raster that was imputed in the model. The raster name should not contain whitespace, and a raster of Geotiff type may work well in Barrier Mapper.
Hope it will help you.

In Chinese,  阻力面栅格最好是以Geotiff的格式保存,另外阻力面栅格的命名应该不能有空格,可以用下划线。
QQ图片20240116101245.png

希望能帮助 到你。

Geoffrey Su

John Gallo

unread,
Jan 16, 2024, 12:33:30 AM1/16/24
to linkage...@googlegroups.com
Thank you Geoffrey Su!  

Nice catch!  Brody, please let us know if that works, otherwise, see the email I sent you directly earlier.

Thanks,

John

Brody

unread,
Jan 19, 2024, 7:29:29 PM1/19/24
to linkage...@googlegroups.com
Hi John,

I attempted to rerun Barrier Mapper again after implementing your suggestions, but I got the same results. I then decided to redownload the Linkage mapper software and created a completely new project with the tutorial data following the tutorial PDF, but got the same Barrier Mapper error (Log file below). 

2024_01_19_1404_Barrier mapper.txt

John Gallo

unread,
Jan 19, 2024, 8:21:07 PM1/19/24
to linkage...@googlegroups.com
Hi Brody,

Thank you for trying the demo data and tutorial.  Very odd that it is not running on your machine.  Did you run the Linkage Pathways tool first?

Also, probably best to reply to just me and we remembr to report out to the list.

Thanks,

JOhn

Arthur Chantrain

unread,
Jul 25, 2024, 4:51:24 AM7/25/24
to Linkage Mapper
Dear Brody,

Were you able to find a working solution for this problem?

I have the same while running the barrier mapper with the demo data...

Many thanks in advance,

Best,

Arthur

Lauren Stoneburner

unread,
Jan 3, 2025, 6:43:08 PMJan 3
to Linkage Mapper
Hi Brody, John, and Arthur,

I have just downloaded Linkage Mapper 3.1.0 and am experiencing the same error as Brody and Arthur, and it looks like there was never a resolution. The issue was with the focal statistics parameter being invalid, and it persisted regardless of whether I used earlier versions of the toolbox or the demo data inputs. 

After spending some time with this, I was able to resolve the issue by revising the "in_neighborhood" input to Focal Statistics on line 233, as such:
Original:
in_neighborhood = ("ANNULUS " + str(innerRadius) + " " +
                                         str(outerRadius) + " MAP")

Revised: 
in_neighborhood = ("Annulus " + str(inner_radius)
                                           + " " + str(outer_radius) + " MAP")


The tool then ran to completion. I hope this helps others resolve who were experiencing the same issue!

Best,
Lauren Stoneburner

John Gallo

unread,
Jan 3, 2025, 7:31:08 PMJan 3
to linkage...@googlegroups.com
Great work Lauren!!

I think this is an issue that is solved one way for ArcMap, and another for ArcPro.  I wonder if your solution will work for both!?

I know barrier mapper has been working for some people, and this is probably why.

Which one are you using? (Arc version numbers and Windows OS V number are encouraged).

You can reply here or better yet, add a comment to the issue I just started for this in Git Hub: https://github.com/linkagescape/linkage-mapper/issues/182

Thanks!

John



How SFEI's Science Made a Difference This Year

--
You received this message because you are subscribed to the Google Groups "Linkage Mapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linkage-mappe...@googlegroups.com.

Lauren Stoneburner

unread,
Jan 3, 2025, 7:44:07 PMJan 3
to linkage...@googlegroups.com
Absolutely, good point. I was using the following systems:
ArcGIS Pro 3.3.2
Windows 11, version 23H2

I have also added this info as a comment to the github thread. 


Lauren Stoneburner, MEM, she/her

Environmental Scientist

Resilient Landscapes

San Francisco Estuary Institute

510-746-7339 office



You received this message because you are subscribed to a topic in the Google Groups "Linkage Mapper" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/linkage-mapper/DVcTCGODh3A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to linkage-mappe...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/linkage-mapper/CAEUWjEsZZPeqnZ-y%3Drdi4GoMtogCP_FAdJPLRUK3Q7GTRBHNNw%40mail.gmail.com.

John Gallo

unread,
Jan 6, 2025, 3:58:53 PMJan 6
to linkage...@googlegroups.com, Lauren Stoneburner
Hello Linkage Mapper Community,

We have a potential fix to a Bug Causing Barrier Mapper to fail on some Arc Pro configurations.

Before we commit it to the main branch of the code repository though, can someone try the new code on an ArcMap configured machine?

Huge thanks to Lauren Stoneburner for solving the bug in her situation, and taking the time to share the solution with all of us via pull request on github. Thanks Lauren!

Here is the pull request (i.e. the proposed code fix), and here is the zip file of the Linkage Mapper toolbox with the fix included, for you to test.  When you test, please post your results and configuration (e.g. Arc version, Windows OS, and if on a PC or Mac) as a comment in the pull request thread on github (ideal) or to Lauren and I.

Thank you!

John


Matthew

unread,
Feb 21, 2025, 12:41:09 PMFeb 21
to Linkage Mapper
Hello - I'm afraid I'm getting the same error, even using the fix.
 i.e. "The following error is being reported on line 241 of "C:\Users\MGuilliatt\Desktop\FixedLink\linkageFocalFix\toolbox\Scripts\s6_barriers.py":ERROR 000581: Invalid parameters. Failed to execute (FocalStatistics)."

The same as Brody, this triggers multiple attempts to execute (Focal Statistics) before ultimately failing and giving an error on line 583. Linkage pathways and pinch-point mapper have worked perfectly fine.

Info:
ArcGIS Pro 3.4.2 (also attempted in 3.2)
OS Name Microsoft Windows 10 Enterprise
Version 10.0.19045 Build 19045

Any help would be greatly appreciated!

Kind regards,
Mat

John Gallo

unread,
Feb 21, 2025, 2:21:26 PMFeb 21
to linkage...@googlegroups.com
Hi Mat,

We are working through this big over in github on an open source community fashion, please join us there.  It appears to be different for different configurations, and hence has different solutions.  WE have yet to land on one that is universal.  Meanwhile, most configurations are working fine.  Sigh.

Anyway, maybe try dcav's last proposal last week in the more dominant of the two threads on this?


Thanks,

John

Zhang

unread,
Jun 11, 2025, 7:45:08 PMJun 11
to Linkage Mapper
HI Jie,

I have tried all the above methods, but the same error still occurs. Do you have any other good suggestions, please?
GISpro3.4.3,     Linkage3.1.0,    circuitscape4.0.7.  and Build network and pinchpoint have been run successfully.

Best regards,
Zhang

Reply all
Reply to author
Forward
0 new messages