POST
|
It would be nice to have both Spyder and Jupyter Notebooks both working in Arc Pro 3.0. Thanks to suggestions from @DanPatterson , @DuncanHornby and others, I can get Spyder working fine. But as soon as I install Spyder, either through the Arc Package Manager, or in a command window using conda or pip, Jupyter Notebooks no longer functions. When opening a Notebook, I either get an error window saying "Failed to load notebook" (both when creating a new notebook, or opening an exiting one), or the code opens with a kernel error (AttributeError: 'IOLoopKernelManager' object has no attribute 'kernel_cmd'), depending on how I installed Spyder. Has anyone figured out the special sauce to get them both working at the same time? For now, I have Spyder installed in a cloned environment, and can go back to the default environment if I want to use a notebook. I've tried this in both 3.0.0 and 3.0.2, with the same results. I've uninstalled/reinstalled Pro a couple times and deleted the entire conda folder when reinstalling. OS is Windows 10 Enterprise. Those of you that have installed Spyder, do you also use Jupyter Notebooks, and do they both work in the same environment? Thanks for any feedback.
... View more
11-07-2022
12:40 PM
|
0
|
5
|
859
|
POST
|
Just a couple comments/questions, a few months removed from the date of your post. First - thanks for posting your process. Every new rev of Arc brings new challenges getting our python IDEs working again, and it's great to have some help, speaking as someone barely conversant in development environments 🙂 First a question - Have you tried opening a Jupyter Notebook after installing Spyder? I had Spyder working fine in Pro 3.0.2, but had not been able to get both Spyder and Jupyter Notebooks working at the same time. Jupyter works fine in the default environment (and outside of Pro), but not in the cloned environment after installing Spyder. So I went back to Pro 3.0.0 (after deleting the entire contents of my conda folder) to try your method of installing Spyder, but unfortunately no change with Jupyter. Secondly just an FYI, for posterity - when I went through installing Spyder in 3.0.0 using the steps you outlined above, there is a minor difference now that it's several months layer. pip now installs Spyder version 5.4.0 rather than 5.3.1, and when starting Spyder I got a missing dependency error, telling me I needed nbconvert >=4.0, which was missing. I tried "pip install -U nbconvert", and that did the trick.
... View more
11-04-2022
04:30 PM
|
1
|
1
|
6451
|
POST
|
Did you find a solution yet? If not, this is what I did based on posts in the "Python Questions" community, which worked well for me: 1) Clone your environment 2) Install "spyder_kernels" using Pro's Package Manager. If you try to install spyder from here, it will fail. 3) Open a DOS window and change to the Scripts folder in the folder of your cloned environment, and type "pip install spyder" That worked for me, and at least some others as well. One thing I will say about this though, is that I think installing Spyder breaks your ability to use Jupyter Notebooks within Arc Pro 3.0. At least, this is the only change I made to my cloned environment, and now I get a kernel error when creating or using a notebook within Pro, but notebooks work fine in the default environment. In terms of installed packages, the only apparent difference between the two environments is the spyder_kernels package...
... View more
11-03-2022
01:13 PM
|
0
|
1
|
473
|
POST
|
Thank you for your replies. It does seem that Value Tables have some rather annoying behaviors, at least in 2.x. Among these annoyances is the inability to apply defaults past the first row, and equally defeating is that Arc throws an error if not all columns are entered - once you add a row, all columns are required. So you can't apply a default and you can't leave it blank. Really, all I wanted was the ability to leave the statistics field blank, but Arc throws the error and you can't execute the tool in that case. So the workaround I'm settling on is this: I found that if you add code to the validation script (specifically updateMessages) to throw a warning when the first raster is entered in the value table, the warning message prevents Arc from throwing the error and preventing the script from executing. I just made the Warning message informational, as shown in the attached pic. Pretty kludgy, but the best I could come up with, short of diving into the Pro SDK. I'll go ahead and mark it solved.
... View more
10-28-2022
10:44 AM
|
0
|
1
|
857
|
POST
|
Hello all, I was wondering if anyone can point me in the right direction here. I'm running ArcGIS Pro 2.9.5 and am creating a tool for a Python Toolbox that will take a bunch of raster layers, and run some statistics on each, among other things. So it will take the input rasters and statistic types (SUM, MEAN, etc.) as a Value Table (i.e., datatype='GPValueTable'). My question is how to set a default for a column in this scenario, specifically the Statistic type. In the code snippet below, setting inRasterList.values = [['', '', 'NONE']] sets the default statistic type to NONE for the first raster, but when subsequent rasters are added, the default is not set (which is obvious from the statement syntax). # -*- coding: utf-8 -*-
import arcpy
class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of the
.pyt file)."""
self.label = "ForSys Tools (Test)"
self.alias = "ForSys Tools"
# List of tool classes associated with this toolbox
self.tools = [Tool]
class Tool(object):
def __init__(self):
"""Define the tool (tool name is the name of the class)."""
self.label = "Sample Rasters"
self.description = "Sample rasters at point locations"
self.canRunInBackground = False
def getParameterInfo(self):
"""Define parameter definitions"""
inRasterList = arcpy.Parameter(
displayName="Raster List (Stands are created from first raster)",
name="strRasters",
datatype="GPValueTable",
parameterType="Optional",
direction="Input"
inRasterList.parameterDependencies = [inRasterList.name]
inRasterList.columns = [["GPRasterLayer", "Raster Layer"], ["GPString", "Output Field Name"], ["GPString", "Statistic Type"]]
inRasterList.filters[2].type = "ValueList"
inRasterList.filters[2].list = ['NONE', 'MIN', 'MAX', 'MEAN', 'SUM']
inRasterList.values = [['', '', 'NONE']]
parameters = [inRasterList]
return parameters So is there some code that can be added to the updateParameters function that will accomplish this? Thanks for any help!
... View more
10-26-2022
12:01 PM
|
0
|
4
|
940
|
POST
|
Background: I've created a survey in Survey123 that we are using to record data for some agronomic field trials. The survey includes photo attachments which I want to make available to the participants, and so I have configured the Attachment Viewer to accomplish this (very useful app, BTW) . However, the photos are associated with different record types in the data model, and I would like to be able to filter by those record types so the different photo types can be viewed separately. The Attachment Viewer doesn't have that kind of non-spatial filtering ability (unless I'm missing something), and so I've created different maps each with a different filtered view of the feature layer with the photo attachments. Here's the problem - when I configure the Attachment Viewer to view the map with the filtered feature layer view in map-focused mode, even though the mapped points show for only the points in the filtered view (as expected), placeholders for all the photo records in the underlying feature layer show in the gallery, though only those in the filtered view actually show (see screenshot). Clicking on one of the "placeholders" in the gallery will actually show a photo even though there's no corresponding point on the map. Is this a known bug or am I missing a setting or something? The attachment-focused view appears to work as expected. Thanks!
... View more
08-11-2021
12:11 PM
|
0
|
4
|
840
|
IDEA
|
@IsmaelChivite Ismael, the link you provided above doesn't seem to work anymore ("Hidden or Archived Page"). Can you provide an update on this question? Thank you.
... View more
07-15-2021
01:50 PM
|
0
|
0
|
273
|
POST
|
Thanks Doug, that sounds a really good way to handle it - definitely don't care for multiple user logins, and I didn't want to lose editor tracking for sure. I can run that idea past our cooperators.
... View more
06-24-2021
10:23 AM
|
0
|
0
|
557
|
POST
|
Greetings all, I have a question regarding securing survey results. We are using Survey123 for data collection in some agronomic field trials across several US universities. I have all cooperators set up in a single AGOL group that is invitation only, and only group members can submit and view survey records. Some participant universities would prefer that only their institution can view their data until they have the chance to ensure it's integrity. They generally have multiple students entering data, and I have initially said that each person collecting data needs to have a separate AGOL account. Now I am questioning that approach though, because in this case in which an institution has multiple students entering data, but that data needs to subsequently be checked by someone else, then how can I set up the security to allow that? So my question is, should I have each institution set up a single AGOL account from which to enter data? And, if I take that approach, can multiple devices be used to enter survey records using the same account, possibly simultaneously? Thanks, hopefully the question was clear...
... View more
06-24-2021
08:52 AM
|
0
|
2
|
564
|
POST
|
Hi Dan, thanks for the response. I should have been clearer - the command I used to try the installation was simply "conda install spyder", without the version number - I didn't actually invoke pip from the command line. Including the version in the install command doesn't change the outcome. And actually, that was only the first error of a very long string (I copied the first several errors at the bottom of this msg - they're all similar). The missing files actually are missing from the cloned environment, but they're there in the default environment. Copying them over by hand results in the same errors though, so not sure what to do next. Maybe I'll just use Jupyter for everything instead. I do like Spyder a lot but not sure it's worth the headaches each time I upgrade Pro. CondaVerificationError: The package for pip located at C:\Users\ringoc\AppData\Local\ESRI\conda\pkgs\pip-21.0.1-py37haa95532_0 appears to be corrupted. The path 'Lib/site-packages/pip-21.0.1-py3.7.egg-info/PKG-INFO' specified in the package manifest cannot be found. CondaVerificationError: The package for pip located at C:\Users\ringoc\AppData\Local\ESRI\conda\pkgs\pip-21.0.1-py37haa95532_0 appears to be corrupted. The path 'Lib/site-packages/pip-21.0.1-py3.7.egg-info/SOURCES.txt' specified in the package manifest cannot be found. CondaVerificationError: The package for pip located at C:\Users\ringoc\AppData\Local\ESRI\conda\pkgs\pip-21.0.1-py37haa95532_0 appears to be corrupted. The path 'Lib/site-packages/pip-21.0.1-py3.7.egg-info/dependency_links.txt' specified in the package manifest cannot be found. CondaVerificationError: The package for pip located at C:\Users\ringoc\AppData\Local\ESRI\conda\pkgs\pip-21.0.1-py37haa95532_0 appears to be corrupted. The path 'Lib/site-packages/pip-21.0.1-py3.7.egg-info/entry_points.txt' specified in the package manifest cannot be found. CondaVerificationError: The package for pip located at C:\Users\ringoc\AppData\Local\ESRI\conda\pkgs\pip-21.0.1-py37haa95532_0 appears to be corrupted. The path 'Lib/site-packages/pip-21.0.1-py3.7.egg-info/not-zip-safe' specified in the package manifest cannot be found. CondaVerificationError: The package for pip located at C:\Users\ringoc\AppData\Local\ESRI\conda\pkgs\pip-21.0.1-py37haa95532_0 appears to be corrupted. The path 'Lib/site-packages/pip-21.0.1-py3.7.egg-info/top_level.txt' specified in the package manifest cannot be found. CondaVerificationError: The package for pip located at C:\Users\ringoc\AppData\Local\ESRI\conda\pkgs\pip-21.0.1-py37haa95532_0 appears to be corrupted. The path 'Lib/site-packages/pip/__pycache__/__init__.cpython-37.pyc' specified in the package manifest cannot be found. ... etc.
... View more
04-08-2021
12:38 PM
|
0
|
0
|
1840
|
POST
|
Hello all, Some time after upgrading to Arc Pro 2.7 (now on 2.7.2) I lost the ability to install anything via the python package manager. In particular I've been trying to re-install Spyder ('cause of course it didn't install with the Arc Pro update). After cloning the default environment as usual and trying to install spyder using "Add Packages", it just goes away for a short bit and nothing gets installed. So I went to the command line (using "proenv.bat), and tried installing it from there, but get the following error: "CondaVerificationError: The package for pip located at C:\Users\ringoc\AppData\Local\ESRI\conda\pkgs\pip-21.0.1-py37haa95532_0 appears to be corrupted. The path 'Lib/site-packages/pip-21.0.1-py3.7.egg-info/PKG-INFO' specified in the package manifest cannot be found." I've uninstalled/reinstalled Arc Pro a couple of times, deleting the old cloned-environment folder each time, but have gotten the same result. Any ideas anyone? Thanks for any input!
... View more
04-07-2021
06:41 PM
|
1
|
4
|
1929
|
POST
|
I've just used the formula to calculate area (A) from side length (a)
... View more
02-19-2021
01:43 PM
|
1
|
1
|
1155
|
POST
|
Oh that's right, I forgot about that annoyance. The neighborhood and zonal tools just pick a value if there's a tie, this one gives you a null value. If you need to get rid of them, you can use IsNull and then SetNull to create a mask that identifies the null values, and then use that mask in Nibble to fill them with the neighboring values. Kind of a pain.
... View more
08-21-2019
07:03 AM
|
0
|
0
|
979
|
POST
|
If I understand your question correctly,, you should be able to use Block Statistics for that. Using your example, it will calculate the majority over unique 10m x 10m windows, rather than the majority over moving windows centered at each 1 meter pixel. I.e., each 10x10 block will have the same value, which you can then resample to 30m.
... View more
08-20-2019
05:45 AM
|
1
|
2
|
979
|
POST
|
Did you click on "View details" to get more information on the error? (You can get to the tool's results, including any error messages, either by clicking on "View details" in the error window that pops up, or by going to the Catalog tab, clicking on "History", and mousing-over the tool name in the list.) It could be that the new field isn't wide enough to hold the concatenated values. I think a quoted string will always turn red in the field calculator.
... View more
05-17-2019
01:01 PM
|
2
|
1
|
528
|
Title | Kudos | Posted |
---|---|---|
1 | 07-07-2023 01:40 PM | |
1 | 06-07-2023 04:07 PM | |
1 | 05-18-2023 11:02 AM | |
1 | 02-27-2023 03:41 PM | |
1 | 11-04-2022 04:30 PM |
Online Status |
Offline
|
Date Last Visited |
11-30-2023
03:49 PM
|