Conan: KeyError USERDOMAIN on `conan install`

Created on 16 Apr 2018  路  2Comments  路  Source: conan-io/conan

We have at least two machines for which conan install errors out with the message:

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\conans\client\command.py", line 1187, in run
    method(args[0][1:])
  File "C:\Python27\lib\site-packages\conans\client\command.py", line 304, in install
    install_folder=args.install_folder)
  File "C:\Python27\lib\site-packages\conans\client\conan_api.py", line 61, in wrapper
    return f(*args, **kwargs)
  File "C:\Python27\lib\site-packages\conans\client\conan_api.py", line 444, in install
    no_imports=no_imports)
  File "C:\Python27\lib\site-packages\conans\client\manager.py", line 395, in install
    installer.install(deps_graph, profile.build_requires, keep_build)
  File "C:\Python27\lib\site-packages\conans\client\installer.py", line 262, in install
    nodes_to_process = self._get_nodes(nodes_by_level, skip_private_nodes)
  File "C:\Python27\lib\site-packages\conans\client\installer.py", line 501, in _get_nodes
    check_outdated)
  File "C:\Python27\lib\site-packages\conans\client\proxy.py", line 47, in package_available
    package_folder = self._client_cache.package(package_ref, short_paths=short_paths)
  File "C:\Python27\lib\site-packages\conans\paths.py", line 162, in package
    return path_shortener(p, short_paths)
  File "C:\Python27\lib\site-packages\conans\util\windows.py", line 57, in path_shortener
    cmd = r'cacls %s /E /G "%s\%s":F' % (short_home, os.environ['USERDOMAIN'], os.environ['USERNAME'])
  File "C:\Python27\lib\os.py", line 425, in __getitem__
    return self.data[key.upper()]
KeyError: 'USERDOMAIN'

Defining an environment variable USERDOMAIN to any value fixes the problem.

Both machines are Windows 7, with Conan 1.2.3.

bug

Most helpful comment

I'm always impressed by your reactivity for fixing bugs. Cheers!

All 2 comments

Yes, this is a bug, will be fixed in next release.
Thanks for telling!

I'm always impressed by your reactivity for fixing bugs. Cheers!

Was this page helpful?
0 / 5 - 0 ratings