philippelatulippe / gitso

Automatically exported from code.google.com/p/gitso
1 stars 0 forks source link

Saving Hostname History Fails On German XP Error Due To Application Settings Being English Localised In Code #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install On German Windows XP
2. Get Help From Someone
3. On exit it tries to save to 'C:\\Dokumente und
Einstellungen\\Inge\\Lokale Einstellungen\\Application Data\\.gitso-hosts'

What is the expected output? What do you see instead?
It managed to get right Documents Folder but the correct path should be
'C:\\Dokumente und Einstellungen\\Inge\\Local
Settings\\Anwendungsdaten\\.gitso-hosts'

Where obviouslz Inge is the users name in this case. I imagine the paths
are available as Environment Variables.. but I'm just assuming !

What version of the product are you using? On what operating system?
Windows XP Home German

Please provide any additional information below.
Error Log:

IOError: [Errno 2] No such file or directory: 'C:\\Dokumente und
Einstellungen\\Inge\\Local Settings\\Application Data\\.gitso-hosts'
Traceback (most recent call last):
  File "Gitso.py", line 170, in ConnectSupport
  File "Gitso.py", line 328, in saveHost
IOError: [Errno 2] No such file or directory: 'C:\\Dokumente und
Einstellungen\\Inge\\Local Settings\\Application Data\\.gitso-hosts'

Original issue reported on code.google.com by felimwhiteley on 21 Jan 2009 at 2:02

GoogleCodeExporter commented 8 years ago
Sorry I typed all sorts of wrong paths there. The path it needs to write the 
file to
is

'C:\\Dokumente und
Einstellungen\\Inge\\Lokale Einstellungen\\Anwendungsdaten\\.gitso-hosts'

And again where Inge is the username.. 

Without being able to write to this file the entire application does not work, 
you
get tot the GUI, but it does nothing after you click Start.

Original comment by felimwhiteley on 21 Jan 2009 at 2:25

GoogleCodeExporter commented 8 years ago
I should clarify that I got it to work be adding the following two folders in 
this
path:

'C:\\Dokumente und Einstellungen\\Inge\\Local Settings\\Application Data\\'

I added Local Settings and Application Data and Gitso rang perfectly, so it 
seems it
can read the German Documents and Settings folder but not the other.

Thanks 

PS: Apologies for this bug for lack of clarity and reposts !

Original comment by felimwhiteley on 23 Jan 2009 at 11:16

GoogleCodeExporter commented 8 years ago
I've a similar problem: 

1) I start gitso aking help on WinXP
2) no way to connect to a linux gitso giving support (tested working with 
another
linux machine asking help)
3) gitso on winxp can't stop: the stop button doesn't work: no cycle
start->stop->start->etc
4) you must close it with the "X" button.
5) on closing a popup msg: "read the log"
6) in the log this test: 
Traceback (most recent call last):
  File "Gitso.py", line 170, in ConnectSupport
  File "Gitso.py", line 328, in saveHost
IOError: [Errno 2] No such file or directory: 'C:\\Documents and
Settings\\utente\\Local Settings\\Application Data\\.gitso-hosts'

The specified path doesn't exist on my win ("utente" is the user name)

Thanks

Original comment by mcianc...@gmail.com on 2 Feb 2009 at 11:42

GoogleCodeExporter commented 8 years ago
To get what is needed is you do want to use "Local Settings\Application Data" 
it's a
bit more tricky. Tim Golden has an article about it over at

http://timgolden.me.uk/python/win32_how_do_i/get-the-desktop-folder.html

CSIDL_APPDATA is the one you have hard coded in line 113 of ArgsParser.py, the 
only
problem is there doesn't seem to be a way to access this with python directly 
using
the standard Python library (that I can find anyway). The Python win32 
extensions
which is what Tim Golden uses do though.

http://starship.python.net/crew/mhammond/win32/

Thing to watch out for is CDIDL is going away from a note on MSDN page

http://msdn.microsoft.com/en-us/library/bb762494.aspx

To be replaced by KNOWNFOLDERID: http://msdn.microsoft.com/en-

But I guess a easier solution would be to use the Application Data folder given 
by
os.getenv('APPDATA') or if the path doesn't exist then create the path manually 
(but
might be at risk of not being carried around in an AD environment.. I think, 
I'm not
really a Win32 programmer!). AFAIK %APPDATA% would roam with the profile or if 
the
users profile is in fact a remote share.

Original comment by felimwhiteley on 25 Feb 2009 at 10:32

GoogleCodeExporter commented 8 years ago
fix using os.getenv('APPDATA') committed to svn revision 77

Original comment by xburn...@gmail.com on 1 Mar 2009 at 8:31

GoogleCodeExporter commented 8 years ago

Original comment by xburn...@gmail.com on 1 Mar 2009 at 8:34