Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Cate package installer fails with spaces in user name #568

Closed
forman opened this issue Mar 17, 2018 · 9 comments
Closed

Cate package installer fails with spaces in user name #568

forman opened this issue Mar 17, 2018 · 9 comments

Comments

@forman
Copy link
Member

forman commented Mar 17, 2018

Using Conda to install the cate or cate-cli package fails on Windows 10, if the user name contains space character.

This is likely caused by batch scripts which lack quoting when variables are expanded.

Steps to reproduce the problem

  1. Create new user profile, e.g. for "Hanni und Nanni", and login
  2. Create Conda environment
  3. conda install -c ccitools -c conda-forge cate-cli

Specifications

Cate 1.0 to 2.0.0.dev4

@forman
Copy link
Member Author

forman commented Mar 17, 2018

@barsten could you please attach your error log.

@barsten
Copy link

barsten commented Mar 18, 2018

Where do I find it?

@barsten
Copy link

barsten commented Mar 18, 2018

Meanwhile I installed CATE under C:\CATE successfully - will the file you ask me to copy still contain the information you need?
Shall I do the failing installation again otherwise so that I can send you the error.log you need, otherwise?

@barsten
Copy link

barsten commented Mar 18, 2018

I just encountered another problem when adding an own local data source. It looks as if it could be the case problem (blank in path name).

Cate Desktop, version 2.0.0-dev.4

add_local_data_source() call raised exception: "Data store "local": Couldn't save data source config file C:\Users\Carsten Brockmann.cate\data_stores\local\local..nc.json
[Errno 22] Invalid argument: 'C:\Users\Carsten Brockmann\.cate\data_stores\local\local.
.nc.json'"

An error (code 20) occurred in Cate Core:

Traceback (most recent call last):
File "C:\Cate\lib\site-packages\cate\ds\local.py", line 763, in _save_data_source
with open(file_name, 'w') as fp:
OSError: [Errno 22] Invalid argument: 'C:\Users\Carsten Brockmann\.cate\data_stores\local\local.*.nc.json'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Cate\lib\site-packages\cate\util\web\jsonrpchandler.py", line 192, in send_service_method_result
result = future.result()
File "C:\Cate\lib\concurrent\futures_base.py", line 425, in result
return self.__get_result()
File "C:\Cate\lib\concurrent\futures_base.py", line 384, in __get_result
raise self._exception
File "C:\Cate\lib\concurrent\futures\thread.py", line 56, in run
result = self.fn(self.args, **self.kwargs)
File "C:\Cate\lib\site-packages\cate\util\web\jsonrpchandler.py", line 268, in call_service_method
result = method(method_params, monitor=monitor)
File "C:\Cate\lib\site-packages\cate\webapi\websocket.py", line 178, in add_local_data_source
data_store.add_pattern(data_source_id=data_source_id, files=file_path_pattern)
File "C:\Cate\lib\site-packages\cate\ds\local.py", line 575, in add_pattern
data_source = self.create_data_source(data_source_id)
File "C:\Cate\lib\site-packages\cate\ds\local.py", line 691, in create_data_source
self._save_data_source(data_source)
File "C:\Cate\lib\site-packages\cate\ds\local.py", line 767, in _save_data_source
"{}".format(file_name, e), source=self) from e
cate.core.ds.DataAccessError: Data store "local": Couldn't save data source config file C:\Users\Carsten Brockmann.cate\data_stores\local\local.
.nc.json
[Errno 22] Invalid argument: 'C:\Users\Carsten Brockmann\.cate\data_stores\local\local.
.nc.json'

@forman
Copy link
Member Author

forman commented Mar 18, 2018

@barsten could you please open a new issue. This is very different from the first.

The error is originating from package cate.ds.local and that's why @kbernat should have a look...

@forman
Copy link
Member Author

forman commented Mar 18, 2018

Where do I find it?

The error was reported in the log of the setup dialog.

@kbernat
Copy link
Collaborator

kbernat commented Mar 20, 2018

@forman do you know what was name of datasource which @barsten tried to create?

@forman
Copy link
Member Author

forman commented Mar 20, 2018

So here is the error log from the original issue:

## Package Plan ##

  environment location: C:\Users\Carsten Brockmann\cate-2.0.0.dev7

  added / updated specs: 
    - cate-cli=2.0.0.dev7


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    locket-0.2.0               |           py36_1           8 KB  conda-forge
    lxml-4.2.0                 |           py36_0         1.1 MB  conda-forge
    ...
    zict:                          0.1.3-py_0                 conda-forge
    zlib:                          1.2.11-vc14_0              conda-forge [vc14]

The following packages will be UPDATED:

    ca-certificates:               2017.08.26-h94faf87_0                  --> 2018.1.18-0      conda-forge
    certifi:                       2018.1.18-py36_0                       --> 2018.1.18-py36_0 conda-forge
    openssl:                       1.0.2n-h74b6da3_0                      --> 1.0.2n-vc14_0    conda-forge [vc14]

==> WARNING: A newer version of conda exists. <==
  current version: 4.4.10
  latest version: 4.5.0

Please update conda by running

    $ conda update -n base conda


locket 0.2.0: ########## | 100% 
lxml 4.2.0: ########## | 100% 
...
geotiff 1.4.2: ########## | 100% 
psutil 5.4.3: ########## | 100% 

The following packages will be DOWNGRADED:

    yaml:                          0.1.7-hc54c509_2                       --> 0.1.7-vc14_0     conda-forge [vc14]


Downloading and Extracting Packages
donearing transaction: ...working... 
donefying transaction: ...working... 
Executing transaction: ...working... 
DEBUG menuinst_win32:__init__(199): Menu: name: 'ESA CCI Toolbox', prefix: 'C:\Users\Carsten Brockmann\cate-2.0.0.dev7', env_name: 'None', mode: 'None', used_mode: 'user'
DEBUG menuinst_win32:create(323): Shortcut cmd is "%COMSPEC%", args are ['/K', '""C:\\Users\\Carsten Brockmann\\cate-2.0.0.dev7\\Scripts\\cate-cli.bat""']
done
Das System kann den angegebenen Pfad nicht finden.

(base) C:\Users\Carsten Brockmann\AppData\Local\Programs\cate-desktop>set "GDAL_DRIVER_PATH=" 


Setup failed: Installation of Python package cate 2.0.0.dev7 did not succeed.

forman added a commit to CCI-Tools/cate-desktop that referenced this issue Apr 20, 2018
@forman forman added the wontfix label Apr 20, 2018
@forman
Copy link
Member Author

forman commented Sep 27, 2018

Problem to be fixed in conda. Solved by warning in setup dialog when detecting space in path.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants