|
POST
|
Thanks for the details. Yes, I can see how this inconsistency is annoying. I'm looking into this, and what the ideal behavior is for uses like this. Here are some alternative approaches you can use immediately: 1. Use an explicit path to your external toolbox for the import. This is brittle since it will be hard coded, but it should work fine for your immediate needs. 2. Copy your code into a module, and place that into the Pro site-packages directory (you can create a setuptools package or conda package for this as well). If you're making something more durable, this is a great way to start creating a library around the code you're using, and then you'll be able to import it elsewhere as well. 3. Add a .pth file which links to the directory where your external toolbox is. You can add this to the Pro site-packages, and it will add that location explicitly to the Python search path (for all processes).
... View more
03-30-2018
09:39 PM
|
0
|
4
|
3371
|
|
POST
|
OK, thanks. It isn't immediately clear to me why it is picking up the conda in your external Anaconda installation, since `where conda` lists the Pro provided one as a priority. But it clearly is, since all the information you posted from `conda info` is from the Anaconda environment, nothing matches what we ship. Could you try removing the Anaconda environment from your path? It is known to cause problems to have multiple Python environments on the PATH, here's what the Anaconda installation says: The other option is, if you don't really care which conda executable you're using, is to specify the full path to the environment you want to modify. So, do something like: activate "C:\Program Files\ArcGIS\bin\Python\envs\arcgispro-py3"
conda upgrade -c esri --no-pin arcgis It looks like you have two environments called "arcgispro-py3" -- the one that ships with Pro, and a second one located in F:\Anaconda\envs. That likely is confusing this arrangement, since the message may be perfectly valid (if there is no arcgis package in that separate "arcgispro-py3" environment). Hope that helps, and happy to keep digging if this doesn't get you where you need to be. Cheers, Shaun
... View more
03-30-2018
08:49 PM
|
1
|
4
|
4683
|
|
POST
|
Phil, Could you open a command prompt, without having activated any conda environments, and paste the results of echo %PATH%? I suspect that your Anaconda installation is registered globally, and is masking the environment variables used by conda in the application. From the activated environment, could you also paste the output of set CON and where conda? Thanks!
... View more
03-30-2018
02:56 PM
|
0
|
6
|
4683
|
|
POST
|
Curtis Price Thanks for digging into this. I'm doing some research on my end, and will post here when that's done. For now, I recommend doing: import sys
sys.path.insert(0, '') In the code block, as you mentioned in your second example. This is the exact behavior of a typical Python process, and will prepend the working directory of the current Pro project to the search path for Python code. There are valid reasons to block this behavior in an embedded use, but I'm checking if they apply to Pro specifically. Cheers, Shaun
... View more
03-30-2018
02:53 PM
|
0
|
0
|
5532
|
|
POST
|
Thanks. Could you download the latest version of the installer (or git pull to update), and try again? I added a fix for this issue. Cheers, Shaun
... View more
02-16-2018
08:39 AM
|
1
|
0
|
1277
|
|
POST
|
Hello Nora Quesada, The current stable version of the bridge doesn't directly support dplyr, but you can try the pre-release for the next version, which does support dplyr. Could you try that version? It's available here: Release v1.0.1.229 · R-ArcGIS/r-bridge · GitHub To install it, you can either place the downloaded .zip file into the same directory as the r-bridge-install toolbox, or you can install it directly from R following this screencast. Thanks, Shaun
... View more
02-16-2018
08:38 AM
|
0
|
0
|
552
|
|
POST
|
OK, thanks. Can you right click on the toolbox and select "Check Syntax", then copy the message that provides?
... View more
02-16-2018
06:45 AM
|
0
|
0
|
1277
|
|
POST
|
Hello Saffet, Could you elaborate on what isn't working? Is the installer not working, or you're unable to run the bridge once it's installed? Thanks, Shaun
... View more
02-16-2018
05:54 AM
|
0
|
0
|
1277
|
|
POST
|
If you install Pro 2.1, it ships with both Jupyter and the ArcGIS API for Python in its default environment -- everything should work out of the box. You can also create environments from the Python backstage (Project > Python), and install packages from that location, without needing the command line. The start menu group for Pro includes a shortcut for Jupyter which you can use directly, or you can invoke it by running "Python Command Prompt", then typing jupyter notebook. Let me know if that isn't clear, or you need any additional guidance. If you're using Pro, you shouldn't need to have a separate Conda install for the Python API at this time, and Pro 2.1 ships with Python 3.6, so you'll be in alignment on that front. Cheers, Shaun
... View more
01-26-2018
07:50 AM
|
1
|
3
|
4156
|
|
POST
|
The specific feature to use an external conda from within the app didn't ship with 2.1, unfortunately. That said, you do have a few options: 1. If you install the program per-user, then UAC will never be invoked, and all of the conda installation will reside inside your AppData directory, and the backstage will install packages to that location. 2. You can create new environments, and use them, from your AppData location, by creating them with Conda. If you run something like `conda create --clone arcgispro-py3 --name my_env` from the command line, it will by default create that new environment in your user profile. You can then use it as you would any other, the only caveat with this approach being that the environment in AppData can't drive Pro itself. 3. You can integrate with an external conda, it just isn't as easy as it should be, and a better approach is being actively worked on. Cheers, Shaun
... View more
01-26-2018
07:30 AM
|
2
|
4
|
5884
|
|
POST
|
Simon, Yes, you can use the same pattern to point at a layer file or direct connection when using arc.write to write the results out: arc.write('c:/path/to/my.sde/dbname.layername', results.df)
Where results.df is the data frame after you've made modifications. Cheers, Shaun
... View more
01-23-2018
12:05 PM
|
0
|
0
|
2488
|
|
POST
|
Hello Simon, To access data stored in an enterprise geodatabase, you have a couple of options: if it's just one layer you're working with, you can save a .lyr file, and work with that directly as a filepath. Otherwise, you can reference tables relative to their SDE connection file, see this answer for more details. Cheers, Shaun
... View more
01-23-2018
11:28 AM
|
0
|
2
|
2488
|
|
POST
|
Jared, BeautifulSoup expects an input that's an HTML page or fragment. Usually, it's doing the top level parsing, but here, you have arcpy_metadata to do the primary parsing, then want to filter the results through BeautifulSoup. If you'd like to learn how to use BeautifulSoup, I recommend their documentation -- it's quite good. In your case, you want to pass through elements of your results to BeautifulSoup for further filtering prior to their output. A simple approach would be to write a function which passed the elements in question on to BeautifulSoup: def strip_html(input):
return BeautifulSoup(input).text Then use that function for those elements which contain HTML.
... View more
12-27-2017
07:21 AM
|
1
|
1
|
7269
|
|
POST
|
Sara, Thank you for the reproducible example. It looks like lubridate converts its date objects into the Date class object, and the bridge isn't currently equipped to read these. For now, you can work around this by making this change on line 5 of your script: ID_PM25_2017$xDate <- as.POSIXct(mdy(ID_PM25_2017$xDate)) I've posted an issue on GitHub to track this, and will update you once we've resolved the underlying issue. Cheers, Shaun
... View more
12-20-2017
08:21 AM
|
1
|
0
|
1549
|
|
POST
|
Naresh, Sorry in my delay responding -- I didn't see this pop up as a thread with recent discussion. Are you writing to a local File Geodatabase when you get this error? Do you have a table with the same name as the feature class in the geodatabase? Thanks, Shaun
... View more
12-01-2017
09:41 PM
|
0
|
0
|
1295
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-24-2025 09:10 PM | |
| 1 | 08-12-2022 10:14 PM | |
| 1 | 05-05-2025 10:56 AM | |
| 1 | 04-04-2025 09:03 PM | |
| 1 | 02-09-2023 10:10 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|