cat-cfs / twobilliontoolkit

This repo stands as a singular place for all the tools that will be developed for the processing of 2 Billion Trees data and information
MIT License
1 stars 0 forks source link

SSL certificate issues when cloning ArcPro #17

Closed nesdolya closed 4 months ago

nesdolya commented 5 months ago

Please review the below commands and determine if they should be incorporated into the commands.bat/ps1 files. Reach out to Andrea for more details as needed.

While trying to cloning the ArcPro environment on a new workstation, there were SSL certificate issues. These issues were only found when attempting to clone the environment within the ArcPro platform, but were not obvious when running the commands script. The below commands were the only work around that we could find when cloning the environment. The '--insecure' tag was supposed to handle this, but it did not appear to work. Instead setting the ssl_verify parameter to false manually first did the trick (in this case).

Working commands:

> conda config --set ssl_verify false
> conda create --clone <path to arcpro env> -p <path to arcpro clone> 

Output when running clone via commands.ps1: It would enter the default ArcPy environment and remain there. When deactivating this environment it would return to the commands.ps1 saying that cloning was complete (when it was not). I'm not sure if there is a way to capture the error found when running it manually, or if we should just automatically apply the ssl_verify = False via command line.

8. Run Record Reviser Independently
9. Exit
Enter your choice: 1
Cloning the ArcGIS Pro environment...
C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\Scripts\proenv.bat

(arcgispro-py3)    C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3> 

Error report when running clone with --insecure manually in the terminal (not through the commands.ps1)

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "conda\exceptions.py", line 1125, in __call__
      File "conda\cli\main.py", line 86, in main_subshell
      File "conda\cli\conda_argparse.py", line 94, in do_call
      File "conda\notices\core.py", line 72, in wrapper
      File "conda\cli\main_create.py", line 43, in execute
      File "conda\cli\install.py", line 217, in install
      File "conda\cli\install.py", line 69, in clone
      File "conda\misc.py", line 316, in clone_env
      File "conda\misc.py", line 117, in explicit
      File "conda\core\link.py", line 277, in execute
      File "conda\common\io.py", line 86, in decorated
      File "conda\core\link.py", line 227, in verify
      File "conda\core\link.py", line 216, in prepare
      File "conda\core\link.py", line 322, in _prepare
      File "conda\core\link.py", line 322, in <genexpr>
      File "conda\core\link.py", line 61, in determine_link_type
      File "conda\gateways\disk\test.py", line 45, in hardlink_supported
    AssertionError: C:\Users\tbasler\AppData\Local\ESRI\conda\pkgs\python-dateutil-2.8.2-pyhd3eb1b0_0\info\index.json

`$ conda create --clone C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3 -p C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3-clone2 --insecure`

  environment variables:
                 CIO_TEST=<not set>
                  CONDARC=C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\.condarc
        CONDA_DEFAULT_ENV=arcgispro-py3
                CONDA_EXE=conda
             CONDA_PREFIX=C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arc
                          gispro-py3
               CONDA_ROOT=C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python
           CURL_CA_BUNDLE=<not set>
                 HOMEPATH=\Users\tbasler
                     PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python310\
                          Scripts\;C:\Python310\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Syste
                          m32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Python27\ArcGI
                          Sx6410.5\lib\site-
                          packages\osgeo\scripts;C:\Python27\ArcGISx6410.5\lib\site-
                          packages\osgeo;C:\Python27\ArcGISx6410.5\lib\site-packages\osgeo\data\
                          gdal;C:\WINDOWS\System32\OpenSSH\;C:\Users\tbasler\AppData\Local\Micro
                          soft\WindowsApps;C:\Users\tbasler\AppData\Local\Programs\Microsoft VS
                          Code\bin;C:\Users\tbasler\AppData\Local\Programs\Git\cmd
             PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\Windows
                          PowerShell\v1.0\Modules
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
         STTASKFOLDERPATH=Ivanti\PatchSDK\Deployments

     active environment : arcgispro-py3
    active env location : C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
       user config file : C:\Users\tbasler\.condarc
populated config files : C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\.condarc
                          C:\Users\tbasler\.condarc
          conda version : 4.14.0
    conda-build version : not installed
         python version : 3.9.16.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python  (writable)
      conda av data dir : C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
https://conda.anaconda.org/esri/win-64
https://conda.anaconda.org/esri/noarch
          package cache : C:\Users\tbasler\AppData\Local\ESRI\conda\pkgs
                          C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\pkgs
                          C:\Users\tbasler\.conda\pkgs
       envs directories : C:\Users\tbasler\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs
                          C:\Users\tbasler\AppData\Local\ESRI\conda\envs
                          C:\Users\tbasler\.conda\envs
               platform : win-64
             user-agent : conda/4.14.0 requests/2.28.1 CPython/3.9.16 Windows/10 Windows/10.0.19045
          administrator : False
             netrc file : None
           offline mode : False

An unexpected error has occurred. Conda has prepared the above report.
nesdolya commented 4 months ago

PS1 cloning of ArcPro environment was not working. Will perform manual cloning when command 1 fails for now.