[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2417: HOMEDRIVE and HOMEPATH environment variables may not be set on Windows 7+
Tahoe-LAFS
trac at tahoe-lafs.org
Mon May 4 21:46:08 UTC 2015
#2417: HOMEDRIVE and HOMEPATH environment variables may not be set on Windows 7+
-----------------------------------------------+------------------------
Reporter: daira | Owner: daira
Type: defect | Status: new
Priority: major | Milestone: 1.10.1
Component: code | Version: 1.10.0
Keywords: windows regression blocks-release | Launchpad Bug:
-----------------------------------------------+------------------------
The `windows_expanduser` function in
[source:src/allmydata/util/fileutil.py] assumes that the current user
account's home directory can be found by joining the %HOMEDRIVE% and
%HOMEPATH% environment variables. This was correct on Windows XP, but on
Windows 7+ (not sure about Vista), these variables are not set, resulting
in this traceback:
{{{
Traceback (most recent call last):
File
"C:\Users\Buildslave\tahoe\Daira_Win7-64_py2_7\build\support\Scripts\tahoe.pyscript",
line 16, in <module>
load_entry_point('allmydata-tahoe==1.10.0.post340', 'console_scripts',
'tahoe')()
File "C:\Users\Buildslave\tahoe\Daira_Win7-64_py2_7\build\support\Lib
\site-packages\setuptools-0.6c16dev6.egg\pkg_resources.py", line 320, in
load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Users\Buildslave\tahoe\Daira_Win7-64_py2_7\build\support\Lib
\site-packages\setuptools-0.6c16dev6.egg\pkg_resources.py", line 2265, in
load_entry_point
return ep.load()
File "C:\Users\Buildslave\tahoe\Daira_Win7-64_py2_7\build\support\Lib
\site-packages\setuptools-0.6c16dev6.egg\pkg_resources.py", line 1998, in
load
entry = __import__(self.module_name, globals(),globals(),
['__name__'])
File
"c:\users\buildslave\tahoe\daira_win7-64_py2_7\build\src\allmydata\scripts\runner.py",
line 7, in <module>
from allmydata.scripts.common import get_default_nodedir
File
"c:\users\buildslave\tahoe\daira_win7-64_py2_7\build\src\allmydata\scripts\common.py",
line 20, in <module>
path = abspath_expanduser_unicode(u"~/.tahoe")
File
"c:\users\buildslave\tahoe\daira_win7-64_py2_7\build\src\allmydata\util\fileutil.py",
line 318, in abspath_expanduser_unicode
path = expanduser(path)
File
"c:\users\buildslave\tahoe\daira_win7-64_py2_7\build\src\allmydata\util\fileutil.py",
line 392, in expanduser
return windows_expanduser(path)
File
"c:\users\buildslave\tahoe\daira_win7-64_py2_7\build\src\allmydata\util\fileutil.py",
line 399, in windows_expanduser
home_drive = windows_getenv(u'HOMEDRIVE')
File
"c:\users\buildslave\tahoe\daira_win7-64_py2_7\build\src\allmydata\util\fileutil.py",
line 419, in windows_getenv
% (err, name))
OSError: Windows error 203 attempting to read size of environment variable
u'HOMEDRIVE'
}}}
https://tahoe-lafs.org/buildbot-tahoe-
lafs/builders/Daira%20Win7-64%20py2.7/builds/17/steps/test-already-have-
dep/logs/stdio
(Windows error 203 is `ERROR_ENVVAR_NOT_FOUND`.)
This is a regression since 1.10.0, therefore a release blocker. The
correct behaviour is to use %USERPROFILE% instead.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2417>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list