Add a Touch of Mystery to Your Halloween with a Swamp Witch Outfit

By admin

The swamp witch outfit is a popular Halloween costume choice for those looking to embrace their dark and mysterious side. With its eerie and enchanting elements, this costume allows individuals to channel their inner witch and step into a world of magic and mystery. To create a swamp witch outfit, one can start with a long, flowing and tattered dress or robe in muted earth tones, such as greens, browns, or grays. These colors help to create an authentic swamp-like appearance. Adding layers of torn or frayed fabric can enhance the outfit's texture and give it a weathered and worn look. It's also recommended to opt for fabrics with a natural or distressed finish to enhance the swamp theme.


I was successful in most of my gp tool migrations. However, there are 2 major "module-based" issues I am having:

The purpose of this script was to iterate through a set of polygons, select the intersecting points in each polygon, load these points into a new Network Analysis Route layer, solve that route, then move on to the next polygon and repeat. One way to access that field is to use the export method to save the output Stops to a feature class and then use it the same way you would any feature class.

Cursor of naxxramas

It's also recommended to opt for fabrics with a natural or distressed finish to enhance the swamp theme. Accessories play a crucial role in completing the swamp witch look. Consider adding a wide-brimmed hat adorned with feathers, leaves, or other natural elements.

Best tips for migrating an arcpy.na script from ArcMap 10.6.1 to Pro 2.5?

Previously, I was working in ArcMap 10.6.1 and created a script utilizing the arcpy.na module. I had no Python background prior to this rather large undertaking, so my (still limited) Python knowledge is based in ArcGIS.

The purpose of this script was to iterate through a set of polygons, select the intersecting points in each polygon, load these points into a new Network Analysis Route layer, solve that route, then move on to the next polygon and repeat.

It was working pretty well! Then, I decided to migrate to Pro 2.5.

I was successful in most of my gp tool migrations. However, there are 2 major "module-based" issues I am having:

1. I am having difficulty understanding how to migrate from the arcpy.mapping module to the arcpy.mp module in Pro.

2. I've been a little confused with the differences between the .nax module and the legacy .na module, even after reading the "choose your module" help page. The .nax module seems much simpler and more straightforward, but it appears to not have the ability to create network analysis layers. That is the main function of my script.

I feel as though I am back at square one trying to navigate these migrations. Does anyone have any experience moving to these new modules? Is anyone else in the same boat as me?

Tags (9) 0 Kudos 10 Replies Esri Regular Contributor ‎07-22-2020 12:53 PM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

If you want to keep your script mostly the same and continue to use NA layers, that will work. But, as you have discovered, there are some code changes required, particularly with regards to working with the arcpy.mapping module in Pro.

This page has some tips about how to migrate an NA layer-based workflow to Pro: Migrating arcpy.na to ArcGIS Pro—Network Analyst module | Documentation

And this page talks about migrating to Pro for the arcpy.mapping module: Migrating from arcpy.mapping to ArcGIS Pro—ArcPy | Documentation

Regarding the newer arcpy.nax module: Yes, the workflows are more straightforward, and as you have noticed, they are not based on layers at all. There is the ability to export an NA layer after solving the analysis, but the primary intent there is for debugging problems. The primary assumption is that at the end of the day, most people just need the Service Area polygons or maybe just a couple of field values from the output of the analysis. The arcpy.nax module allows you to access those things directly. You can use the export() method to export the polygons to a feature class on disk, or you can loop through the analysis results using a search cursor if you just need to grab a few field values.

If you are having trouble with a few specific lines of code, feel free to paste them here and I can take a look.

New Contributor II ‎07-28-2020 11:51 AM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Thank you for your quick response. I read through the materials again with your explanations in mind and I attempted to edit my script accordingly. I was going to give it a whirl again using the .nax module and foregoing the arcpy.mp module (since the .nax module is more straightforward with exporting fields).

However, I had a .nax module issue from the get-go. Even after checking out the network analyst extension, I am receiving this error on the following line:

route.load(arcpy.nax.RouteInputDatatype.Stops, input_stops)AttributeError: module 'arcpy.nax' has no attribute 'RouteInputDatatype'

Is this a sign that I should instead try to utilize the arcpy.mp module in conjunction with the legacy arcpy.na module?

0 Kudos Esri Regular Contributor ‎07-28-2020 12:05 PM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Don't give up yet! You just have a capitalization error, and the code is case sensitive. It's "Type", not "type" in "RouteInputDataType".

New Contributor II ‎07-29-2020 06:31 AM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Thank you Melinda! That's all I needed to make it work, and it looks great!

The .nax module is definitely more straightforward and user-friendly; it looks like I saved myself about 20 lines of code with the switch.

I do have one (hopefully) last question, regarding the returnDirections property. I have read that .nax stores everything in memory, and I would like to view the turn-by-turn directions for the generated route. I do not have much experience with in-memory storage. Is there a quick line of code I can insert to call to the route directions output, using that returnDirections property on the route solver?

My purpose in viewing the directions is to see the sequence of the stops that are used on the route. Is there a better way to view the sequence using the .nax module than trying to view the directions output?

0 Kudos Esri Regular Contributor ‎07-29-2020 08:04 AM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Yes, that's definitely possible. What you want is the Sequence field in the output Stops.

This page lists the field available in the outputs: Route output data types—ArcGIS Pro | Documentation

One way to access that field is to use the export() method to save the output Stops to a feature class and then use it the same way you would any feature class. But if you just want to get the sequence values, you can use searchCursor() to access them directly:

result = route.solve() fields = ['Name', 'RouteName', 'Sequence'] for row in result.searchCursor(arcpy.nax.RouteOutputDataType.Stops, fields): print(row)
0 Kudos New Contributor II ‎08-03-2020 11:44 AM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Thanks again for all the help lately! That method worked perfectly and I feel confident with the .nax module for routing now!

Down the line we are possibly going to be using this script to host map services, so I am also trying to fix the .na module code to work in Pro and to better my understanding of its differences. Now I am having difficulty with the MakeRouteAnalysisLayer method.

layer_object = arcpy.na.MakeRouteAnalysisLayer(network, route_name, "Driving Time", "FIND_BEST_ORDER", "", "", "ALONG_NETWORK", "", "DIRECTIONS", "")

I am receiving this error:

TypeError: MakeRouteAnalysisLayer() takes from 0 to 9 positional arguments but 10 were given

I am working from this syntax:

MakeRouteAnalysisLayer(network_data_source, , , , , , , , , )

Previously, when I attempted to modify my code for use in Pro (before my initial post requesting help), it was not returning this error. Any insight into this?

Thanks in advance,

0 Kudos Esri Regular Contributor ‎08-03-2020 11:54 AM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

The time_zone_for_time_fields parameter was just added at ArcGIS Pro 2.6, so if you have not updated to 2.6 yet, that's probably the source of the error. You can just leave out the last "" in your call to MakeRouteAnalysisLayer.

0 Kudos New Contributor II ‎08-06-2020 12:39 PM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Ah, ok that makes sense. I didn't see an option to view syntax specifically for 2.5; is that documented somewhere or is it more of an understanding gained from working in Pro more and more?

That worked for me, but I am now getting an error when I try to load my points into the stops sublayer. I am wondering if it is a similar issue, where one of the parameters I am using is only for 2.6?

This is the block of code I am using:

layer_object = arcpy.na.MakeRouteAnalysisLayer(network,route_name,"Driving Time","FIND_BEST_ORDER","","","ALONG_NETWORK","","DIRECTIONS").getOutput(0) sublayer_names = arcpy.na.GetNAClassNames(layer_object) stops_sublayer_name = sublayer_names["Stops"] routes_sublayer_name = sublayer_names["Routes"] arcpy.na.AddLocations(layer_object, stops_sublayer_name, input_points, "", "5000 Meters", "IDNO", "", "MATCH_TO_CLOSEST", "APPEND", "NO_SNAP", "5 Meters", "INCLUDE", "") arcpy.na.Solve(layer_object, "SKIP")‍‍‍‍‍‍‍‍‍‍

This is the error returned on line 7:

ExecuteError: Failed to execute. Parameters are not valid. ERROR 000840: The value is not a Network Analyst Layer. Failed to execute (AddLocations).

I am confused as to why it is not recognizing my "layer_object" as an NA Layer, especially because I can see the NA Layers being added to my map and table of contents while the script is running.

Also, I apologize for asking so many questions! I am usually pretty good about being able to research my errors and figure out a solution, but I feel like with all the updates to Pro and new modules I need to utilize, I'm having difficulty finding common errors and solution documentation.

And this page talks about migrating to Pro for the arcpy.mapping module: Migrating from arcpy.mapping to ArcGIS Pro—ArcPy | Documentation
Swamp witch outfit

This hat can give the costume an extra touch of mystery while also protecting from the sun or rain. Additionally, incorporating large spider or snake-themed jewelry can add an element of darkness and danger. When it comes to makeup, the swamp witch look embraces a more natural and earthy appearance. Primarily, it's best to focus on creating a pale complexion with a slightly gray or green tint to mimic the look of being surrounded by the swamp. A smoky eye with dark and earthy tones can add depth and intensity to the overall look. Applying green or black lipstick can further emphasize the witch-like aura. To complete the swamp witch outfit, consider creating a few custom accessories, such as a broomstick made from twigs or a large necklace made from bones or animal parts. Adding some fake moss or leaves to the dress can also bring a touch of realism to the outfit. In conclusion, the swamp witch outfit is a captivating and intriguing choice for Halloween or costume parties. With its mix of earthy colors, tattered fabrics, and dark accessories, this costume allows individuals to fully embrace their witchy alter ego and step into a world of enchantment and mystery..

Reviews for "Embrace Your Witchy Side with a Spooky Swamp-inspired Costume"

1. Lucy - 2 stars
I was really excited to try out the swamp witch outfit for Halloween, but I was thoroughly disappointed with the quality. The fabric felt cheap and it didn't fit properly. The hat was flimsy and looked nothing like the picture. I ended up having to make some adjustments just to make it wearable. Overall, I wouldn't recommend this outfit unless you're really desperate.
2. Mike - 1 star
I purchased the swamp witch outfit for a costume party and I regretted my decision. The colors were much duller in person and the fabric had a weird smell to it. The sizing was completely off, and it was impossible to adjust it properly. On top of that, the accessories included were cheaply made and fell apart within minutes. Save your money and look elsewhere for a better quality costume.
3. Sarah - 2 stars
The swamp witch outfit looked so promising online, but it was a disappointment in reality. The material was uncomfortable and itchy, making it unbearable to wear for more than a few minutes. The fit was also off, especially around the waist, making the costume look unflattering. The hat was also misshapen and would not stay on my head properly. I expected better quality for the price I paid.
4. John - 2 stars
I bought the swamp witch outfit for a themed party, hoping to turn heads with a unique costume. Unfortunately, it fell short of my expectations. The dress was poorly made and the stitching was coming apart in some places. The sizing was inaccurate, and even after trying to adjust it, it still didn't fit right. The overall quality was disappointing, especially considering the price I paid. I would not recommend this outfit to anyone looking for a professional-looking costume.

Unleash the Power of the Swamp with a Bewitching Witch Costume

Transform Yourself into a Mysterious Swamp Witch with the Perfect Outfit

We recommend

mwtvo AND 9102826 AND 41133155 AND 28442471 AND 3907424 AND pv1e7h2p AND drpitzy AND 4961873 AND avfk AND egdfulne