-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Julia and windows user names with ligature letters #14357
Comments
@hustf, what does |
Maybe we should be using SHGetFolderPath on Windows. |
Wouldn't you want the non deprecated function though? |
|
Is this actually a Windows issue? Os x does not permit such letters in the username. With windows, the local user name as used in the folder structure is not chosen by the user, but is generated automatically based on, for example, the Microsoft account name. The full directory name to user files is hidden with the common usage patterns. |
Oh, I missed these @stevengj julia> ENV["HOME"] julia> ENV["HOMEDRIVE"] julia> ENV["HOMEPATH"] |
So, it seems like we would be okay if we ignored |
Please try: immutable GUID
data1::UInt32
data2::UInt16
data3::UInt16
data4_0::UInt8
data4_1::UInt8
data4_2::UInt8
data4_3::UInt8
data4_4::UInt8
data4_5::UInt8
data4_6::UInt8
data4_7::UInt8
end
const FOLDERID_Profile = GUID(0x5e6c858f, 0x0e22, 0x4760,
0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73)
function whomedir()
p = Ref{Ptr{Cwchar_t}}()
ok = ccall((:SHGetKnownFolderPath,"shell32"), stdcall, UInt32, (Ref{GUID},UInt32,Ptr{Void},Ref{Ptr{Cwchar_t}}),
FOLDERID_Profile, 0, C_NULL, p)
ok != 0 && error("failure $ok calling SHGetKnownFolderPath")
s = wstring(p[])
ccall((:CoTaskMemFree,"ole32"), stdcall, Void, (Ptr{Cwchar_t},), p[])
return bytestring(s)
end
whomedir() This works on a Windows machine I tried, and lets us get the home directory without using |
libuv also has that functionality in the next version http://docs.libuv.org/en/v1.x/misc.html#c.uv_os_homedir why do you have a HOME variable defined? that is likely to confuse posix-based programs like git and cygwin. |
stevengj, confirmed: | | || | | | (| | | Version 0.4.2 (2015-12-06 21:47 UTC) ERROR: SystemError: opening file C:\USERS\FRO;.julia_history: No such file or directory INFO: Disabling history file for this session. julia> const FOLDERID_Profile = GUID(0x5e6c858f, 0x0e22, 0x4760, julia> function whomedir() julia> julia> whomedir() julia> |
@vtjnash, |
vtjnash, I have defined a PATH variable because I want to start Julia from the github command line. I may have a HOME variable because some other licensed software I'm using requires it. I don't know. |
@hustf can you try adding |
@tkelman - Julia starts with no error messages. And the history file is present on a second start-up. I run into this problem:
So this is the current contents of .juliarc:
Jumping to MS-DOS, it turns out that the environment variable HOME is pretty unusable anyway:
I do not know which program defined the HOME environment variable. Perhaps Anaconda did? I try to delete it. [pao: code block format fixes] |
Deleting this malformed HOME environment variable seems to solve everything. So this issue can be closed I guess. The HOME variable is not normally defined in Windows as far as I know, but it is defined by logon scripts at for example my workplace, where it is used by licensing software and for document checkouts. Perhaps using it on Windows system is not the most robust way for Julia. |
Arguably, we should close this issue by not preferentially looking at |
Ok. The following is not a Julia issue, I guess, but I can't build IJulia; ===============================[ ERROR: IJulia ]================================ |
@hustf, please file an IJulia issue. In general, we like to keep issues focused on a single bug at a time. |
stevengj, the 'IJulia issue' will be fixed when BinDeps is tagged. As per now, many or all Windows users must checkout BinDeps to make it and dependent packages work. JuliaPackaging/BinDeps.jl#191 This calls for further improvements and may be the reason why the BinDeps fix is not tagged: |
I'll tag BinDeps anyway. There are some fixes still needed but it shouldn't hurt to tag more often. |
seems there's no bug here |
Yes, pretty sure we are now. |
Yup, we are using |
How should I test this, now? Which version? |
If you can try to reproduce the issue with the latest 0.5-dev nightly that would be useful, thanks! |
Ok, will have to download it first. Any special PATH settings? |
@hustf, although even if we are linking a libuv with |
In particular, our |
| | |_| | | | (_| | | Version 0.5.0-dev+4990 (2016-06-29 01:07 UTC)
_/ |\__'_|_|_|\__'_| | Commit 05f2e31* (0 days old master)
|__/ | x86_64-w64-mingw32
julia> ENV["HOME"]
"C:\\Users\\Æøå"
julia> homedir()
"C:\\Users\\Æøå" I created a new user with administrative rights to do this. The HOME variable is set to %USERPROFILE%. Which is the reasonable value. Users without administrative rights can not have their own set of environment variables, but inherits system level environment variables. When setting the system level HOME to %USERPROFILE%, Windows in this case does not parse this variable correctly. Julia will then also create an error similar to that in the first post. |
now uses |
originally reported issue should be tested for |
Original issue was a user configuration error |
I have not seen this issue mentioned anywhere, although it has probably been around for all Julia versions.
Letters like æ, ø, å commonly appear in names. In my name, for one, they appear every single time. This means I can't easily use Julia professionally, as I can't just establish a new user name at work. On personal computers, I have established 'Julia only' user names. There may be other workarounds, but those would not be apparent to other new Julia users.
If this is fixed within Julia, it may still be an issue when using Python packages?
The text was updated successfully, but these errors were encountered: