eaglexmw / seascope

Automatically exported from code.google.com/p/seascope
Other
0 stars 0 forks source link

def app_get_config_file(self) : config_file = '~/.seascoperc' causes exceptions on windows. #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Windows, Seascope 0.4  (causes worse problems on seascope 0.3)

On a "windows" system Running the application and doing anything which would 
require access to the config file causes an exception: 

Traceback (most recent call last):
  File "C:\Oz\Setups\seascope-0.4\seascope-0.4\seascope-0.4\src\Seascope.py", li
ne 36, in file_preferences_cb
    self.app_write_config()
  File "C:\Oz\Setups\seascope-0.4\seascope-0.4\seascope-0.4\src\Seascope.py", li
ne 169, in app_write_config
    cf = open(self.app_get_config_file(), 'w')
IOError: [Errno 2] No such file or directory: 'H:\\/.seascoperc'

The problem is the following expression at def app_get_config_file(self) in 
file seascope.py:
    config_file = '~/.seascoperc'

    changing it to 'seascoperc' worked, and configuration is saved correctly. 

Very usefull software,
Thanks    

Original issue reported on code.google.com by ozgunkar...@gmail.com on 29 Feb 2012 at 10:32

GoogleCodeExporter commented 9 years ago
Thanks for reporting the issue. We need more testing on windows.

Original comment by anil.om...@gmail.com on 6 Mar 2012 at 7:57

GoogleCodeExporter commented 9 years ago
Hi Ozgun,

I can't reproduce the problem with current trunk on Vista Home x86. Can you 
give it a try?

Original comment by antliu@gmail.com on 5 Sep 2012 at 12:38

GoogleCodeExporter commented 9 years ago
Hi Anil, 

Just had a more detailed look. The problem was in my system: 

for some reason , HOME environment was set to H: drive, which I don't have 

looking at os.path.expanduser(path), it seems in windows if HOME is set, it 
gets used, instead of the combination of HOMEPATH and HOMEDRIVE. 

In this case H:\/.seascoperc was returned by the function, causing the 
exception. 

Sorry for the initial wrong report, 
Ozgun

Original comment by ozgunkar...@gmail.com on 5 Sep 2012 at 2:33

GoogleCodeExporter commented 9 years ago
Thanks!
I was wondering what the issue really was and now the mystery turned out to be 
user-defined customization.

Original comment by anil.om...@gmail.com on 28 Sep 2012 at 9:01