[GRASS-dev] create location in windows

Hi devs,

a colleague of mine has problem creating new location on Windows7.
Here the error that she got using epsg code or prj file

Traceback (most recent call last):
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\gis_set.py", line
500, in OnWizard
    grassdatabase = self.tgisdbase.GetValue())
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\location_wizard\w
izard.py", line 1916, in __init__
    msg = self.OnWizFinished()
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\location_wizard\w
izard.py", line 2111, in OnWizFinished
    **addl_opts)
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\etc\python\grass\script\core.p
y", line 1396, in create_location
    encoding='utf-8', mode='w')
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\Python27\lib\codecs.py", line
881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: u'D:\\GEOGRAPHY\\MODIS\\PERMANENT\
\MYNAME'

D:\\GEOGRAPHY\\ exists and MODIS should be the location.

Any idea? a bug already fixes in RC2?

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

On Wed, Jul 29, 2015 at 4:33 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

Hi devs,

a colleague of mine has problem creating new location on Windows7.
Here the error that she got using epsg code or prj file

Traceback (most recent call last):
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\gis_set.py", line
500, in OnWizard
    grassdatabase = self.tgisdbase.GetValue())
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\location_wizard\w
izard.py", line 1916, in __init__
    msg = self.OnWizFinished()
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\location_wizard\w
izard.py", line 2111, in OnWizFinished
    **addl_opts)
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\etc\python\grass\script\core.p
y", line 1396, in create_location
    encoding='utf-8', mode='w')

... mhh, once again an encoding issue?

  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\Python27\lib\codecs.py", line
881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: u'D:\\GEOGRAPHY\\MODIS\\PERMANENT\
\MYNAME'

I wonder why there are double \\ while two lines above there are only
the common single \.

Just guessing...

D:\\GEOGRAPHY\\ exists and MODIS should be the location.

Is D:\\GEOGRAPHY\\MODIS\\PERMANENT\ there?

Any idea? a bug already fixes in RC2?

Good question, maybe worth trying.

Markus

On 29 July 2015 at 16:42, Markus Neteler <neteler@osgeo.org> wrote:

On Wed, Jul 29, 2015 at 4:33 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

Hi devs,

a colleague of mine has problem creating new location on Windows7.
Here the error that she got using epsg code or prj file

Traceback (most recent call last):
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\gis_set.py", line
500, in OnWizard
    grassdatabase = self.tgisdbase.GetValue())
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\location_wizard\w
izard.py", line 1916, in __init__
    msg = self.OnWizFinished()
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\gui\wxpython\location_wizard\w
izard.py", line 2111, in OnWizFinished
    **addl_opts)
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\etc\python\grass\script\core.p
y", line 1396, in create_location
    encoding='utf-8', mode='w')

... mhh, once again an encoding issue?

I don't think is an encoding problem...

  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\Python27\lib\codecs.py", line
881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: u'D:\\GEOGRAPHY\\MODIS\\PERMANENT\
\MYNAME'

I wonder why there are double \\ while two lines above there are only
the common single \.

if it used os.path.normpath it add double \

Just guessing...

D:\\GEOGRAPHY\\ exists and MODIS should be the location.

Is D:\\GEOGRAPHY\\MODIS\\PERMANENT\ there?

no, it should be created by the location wizard...

Any idea? a bug already fixes in RC2?

Good question, maybe worth trying.

we will try tomorrow...

Markus

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

Hi Luca,

Luca Delucchi wrote

Hi devs,

a colleague of mine has problem creating new location on Windows7.
Here the error that she got using epsg code or prj file

Traceback (most recent call last):
  File "C:\Program Files (x86)\GRASS GIS
7.0.1RC1\gui\wxpython\gis_set.py", line
500, in OnWizard
    grassdatabase = self.tgisdbase.GetValue())
  File "C:\Program Files (x86)\GRASS GIS
7.0.1RC1\gui\wxpython\location_wizard\w
izard.py", line 1916, in __init__
    msg = self.OnWizFinished()
  File "C:\Program Files (x86)\GRASS GIS
7.0.1RC1\gui\wxpython\location_wizard\w
izard.py", line 2111, in OnWizFinished
    **addl_opts)
  File "C:\Program Files (x86)\GRASS GIS
7.0.1RC1\etc\python\grass\script\core.p
y", line 1396, in create_location
    encoding='utf-8', mode='w')
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\Python27\lib\codecs.py",
line
881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory:
u'D:\\GEOGRAPHY\\MODIS\\PERMANENT\
\MYNAME'

D:\\GEOGRAPHY\\ exists and MODIS should be the location.

Any idea? a bug already fixes in RC2?

--
ciao
Luca

tested here with

GRASS Version: 7.0.1RC2
GRASS SVN Revision: 65731
Erstellungsdatum: 2015-07-21
Build Platform: i686-pc-mingw32
GDAL/OGR: 1.11.2
PROJ.4: 4.8.0
GEOS: 3.4.2
SQLite: 3.7.17
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-Vista-6.0.6002-SP2 (OSGeo4W)

in a german locale box.

location creating by epsg code or prj file works here without any problem

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/create-location-in-windows-tp5217591p5217613.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

Markus Neteler wrote:

>> IOError: [Errno 2] No such file or directory: u'D:\\GEOGRAPHY\\MODIS\\PERMANENT\
>> \MYNAME'

I wonder why there are double \\ while two lines above there are only
the common single \.

The error message is using repr() (note the "u" prefix):

  > x = ur'a\b'
  > print x
  a\b
  > print str(x)
  a\b
  > print repr(x)
  u'a\\b'

The backslashes are a red herring. The error indicates that either the
location or the PERMANENT mapset doesn't exist.

--
Glynn Clements <glynn@gclements.plus.com>