Select to view content in your preferred language

Script Editor in ArcPro 3.1.0 not honoured, help!

1683
6
02-25-2023 09:23 AM
DuncanHornby
MVP Notable Contributor

All,

So I have allowed ArcPro to update to 3.1.0. It decided my cloned python environment was broken so I had to delete it and clone another, that seemed to go all OK. I then installed spyder into the new environment, that was more problematic but I solved it and can confirm spyder opens OK and is aware of arcpy, so that seems to all be working OK.

But the upgrade lost its link to the default script editor, so I reset that under the GeoProcessing Options as shown below:

DuncanHornby_2-1677345719284.png

 

But when I right click and choose edit on my toolbox that I am developing python scripts in it opens the script up in the Windows notepad and not spyder.

 

DuncanHornby_1-1677345585609.png

 

It seems to unpack the tool script into a temporary folder location, for example C:\Users\hornb\AppData\Local\Temp\ArcGISProTemp14556

I'm desperate for advice as I am unable to develop my code, I need to open it in spyder, not windows notepad!

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

I pip installed the most recent version of spyder and set the default script editor as you did.  Strangely, the old right-click edit starts spyder but doesn't open the associated script to edit.    You have to make sure that the clone is the active environment from the project backstage.  It usually works.. but... I have just gotten into the practice of opening spyder, opening the script that I want to edit and edit there.  To test edits, often entails moving out of catalog, then back in to restart the script (but I tend not to do this multiple times in a session).


... sort of retired...
0 Kudos
DuncanHornby
MVP Notable Contributor

Hi Dan,

Thanks for your input and I can confirm that my cloned environment was the active environment.  I'm proper fed up with ArcPro breaking the python environment and causing applications to fail. Why do they bother to promote the use of spyder (as its part of the install packages) when it never works and you have to end up fiddling around with installing versions and trawling forums to work out how to get LSP working. I also note the outlines pane stopped functioning with this update.

So I have done what probably thousands of other users have done and that is simply to give up. It's a shame as I was enjoying using spyder.

I've held out against VSCode in attempt to support the little guys and have just installed that, it works fine and first time...

If anyone from ESRI is reading this; seriously either remove spyder from your install package or spend some quality time working out why it breaks every time you release a significant update.

I have removed spyder from my system.

ShaunWalbridge
Esri Regular Contributor

Hi Duncan,

I'm sorry for your experience with Spyder, that sounds incredibly frustrating.

Unfortunately, Spyder is particularly complicated to support because it is built and run out of its own conda environment, and getting an environment which works well for both Pro and Spyder isn't a completely trivial task for either party. If you'd like us to have better integration with Spyder, I'd definitely be willing to track it in an idea or somewhere that we can gauge the relative value of the work. I think Spyder is a nice application and would like it to work better, I have worked on a number of issues Dan has brought up over the years, but with mixed results. The install packages pane is an optimists' world, and unfortunately there are areas where new packages won't work to the level that is helpful. I'm not sure doing per-package blocking is a good idea because we'd have to carefully track these for every release of a blocked package, I think I'd rather try to get feedback on what we need to make the Spyder experience better, and whether the Spyder developers can help us to that end.

Best wishes,
Shaun

DanPatterson
MVP Esteemed Contributor

Yes, sadly python and numpy versions are my main beef. I suspect that there are too many entities that they are trying to accommodate... an uneviable task for sure.  


... sort of retired...
0 Kudos
AndrewFrank2
New Contributor

How did you get Spyder to open and recognize ArcPy again?

Tags (1)
0 Kudos
DuncanHornby
MVP Notable Contributor
0 Kudos