arcgis-python-api icon indicating copy to clipboard operation
arcgis-python-api copied to clipboard

unicode error in numpy __config__.py file, post cloning of default environment in ArcGISPro 3.0.1

Open geoshifu opened this issue 3 years ago • 1 comments
trafficstars

Describe the bug numpy config.py file is throwing following unicode error. SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

I am using ArcgisPro version 3.0.1

The only change after cloning of default arcgispro-py3 environment was the installation of "sentinelsat" package using conda install -c conda-forge sentinelsat

To Reproduce the Error Steps to reproduce the behavior:

  1. Install ArcGISPro 3.0.1
  2. Clone the default "arcgispro-py3" environment
  3. Install 'sentinelsat' package, version 1.1.1
  4. import arcpy

Screenshots Few screenshots are attached here for ready reference

Screenshot 1 >> error_screenshot_01

Screenshot 2 >> error_screenshot_02_orig

Platform:

  • OS: Windows OS
  • Browser : Not Applicable
  • arcgis.version >> '2.0.1'

geoshifu avatar Sep 14 '22 06:09 geoshifu

@geoshifu If the conda-forge install overwrites the NumPy builds that Pro ships with, it will likely lead to crashes because the defaults packages Pro ships with and conda-forge aren't binary compatible, which conda-forge documents but still is a hassle. The simplest thing to try is instead of adding conda-forge as a global channel on the command, try installing just the package. So, after doing a default clone, run:

conda install conda-forge::sentinelsat

Locally, this ran:

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\conda\envs\sat

  added / updated specs:
    - conda-forge::sentinelsat


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    geojson-2.5.0              |             py_0          15 KB  conda-forge
    html2text-2020.1.16        |             py_0          33 KB  conda-forge
    sentinelsat-1.1.1          |     pyhd8ed1ab_0          47 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         3.1 MB

The following NEW packages will be INSTALLED:

  geojson            conda-forge/noarch::geojson-2.5.0-py_0
  html2text          conda-forge/noarch::html2text-2020.1.16-py_0
  sentinelsat        conda-forge/noarch::sentinelsat-1.1.1-pyhd8ed1ab_0
  tqdm               pkgs/main/win-64::tqdm-4.64.0-py39haa95532_0

In this case you can see that none of the conda-forge packages are platform specific (noarch) which means no C binaries to deal with ABI issues. I tried this locally and it seemed to work OK, let me know if it does on your end. If you run your install with --dry-run you can see exactly what would change, and if there are significant changes, the chances of something going sideways go up greatly.

scdub avatar Sep 17 '22 02:09 scdub

@geoshifu Please feel free to let us know if this solution worked for you, thanks!

nanaeaubry avatar Oct 18 '22 19:10 nanaeaubry