Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#37 closed defect (fixed)

grass: wxpython gui issues

Reported by: jachym Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords: GRASS
Cc: grass-dev@…

Description

Maybe I did something wrong, but when I tryed to start GRASS (Start->OSGeo4W->GRASS), I got only command line - no gui appeard (and it was not possible to start it via g.gui module).

Attachments (3)

diff (1.6 KB ) - added by jef 15 years ago.
vdigit-vc-build.tar.bz2 (1.8 KB ) - added by jef 15 years ago.
distutils setup.pys and package batch file
OSGeo4W-vc7.bat (126 bytes ) - added by jef 15 years ago.
batch file to get a command prompt with VC7 in the OSGeo4W environment

Download all attachments as: .zip

Change History (37)

comment:1 by jachym, 15 years ago

Tcl/Tk GUI works, text works, wxpython does not.

One can change the GUI using .grassrc6 file in c:\documents and settins\user\

starting command line, running python and

>>> import wx
>>> wx.__version__
2.8.9.1

works

in the osgeo4w-setup.exe, advanced->package selection

All->Libs->wxpython (checked)

So, is the windows grass64.bat able to start grass in wxpython mode?

BTW: osgeo4w\bin\grass64.bat does not accept --help (or other) parameter.
BTW2: why is wxpython located in Libs and tcl/tk in Desktop ?

Sorry for this messy bugreport - I included all I found while testing.

comment:2 by neteler, 15 years ago

Cc: grass-dev@… added

I checked and lib/init/init.bat (which then becomes grass64.bat during compilation, http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/init/init.bat) does not yet contain wxpython stuff but only tcltk stuff.

@grass-dev: It would be great to update init.bat to also support the new GUI. At least it should start otherwise nobody will be able to test it on Windows.

Markus

by jef, 15 years ago

Attachment: diff added

comment:3 by neteler, 15 years ago

Patch applied to GRASS 6.4.0svn (for RC3), 6.4.svn and 7.svn - thanks!

Now testing required.

comment:4 by jef, 15 years ago

the grass-6.4.0RC2-2 package contains the fix

in reply to:  4 ; comment:5 by jachym, 15 years ago

Summary: grass gui missinggrass: wxpython gui issues

Replying to jef:

the grass-6.4.0RC2-2 package contains the fix

GREAT! GRASS starts now in wxpython mode!

What does not work:

  • wx-nviz (no error message, when you switch the monitor to 3D view, nothing happens)
  • wx-v.digit -- Only message I get is
    Unable to initialize the display driver, see README file for more informations.
    
    Details: 'NoType' Object has no attribute 'OpenMap' (no module named grass6_wxvdigit).
    
    Is the grass6_wxvdigit compiled ?
  • when I want to display raster/vector file, only mapsets are listed, but no maps in the d.rast/vect GUI form. In the command line is:
    g.mlist: command not found
    
    (translated from czech-windows to english-unix) adding raster name manually works
  • while starting GUI, first message I get (in the command line):
    profile.py: 
       This module requires the NumPy module, 
       which could not be imported. It probably is not installed (it's not part of standard Python distribution). See ....
    
    eventhough numpy can be installed, it is not checked by default. it should be IMHO checked, when the user requires GRASS automaticaly (as well as wxpython). afterwards the profiling tool works
  • I did not manage to run *any* of raster modules. Nothing happens simply. Maybe it is the g.mlist issue?

Shall I open new tickets for every of these issues separately?

Some screenshots

in reply to:  5 comment:6 by martinl, 15 years ago

Replying to jachym:

What does not work:

  • wx-nviz (no error message, when you switch the monitor to 3D view, nothing happens)
  • wx-v.digit -- Only message I get is
> Unable to initialize the display driver, see README file for more informations.
> 
> Details: 'NoType' Object has no attribute 'OpenMap' (no module named grass6_wxvdigit).

Is the grass6_wxvdigit compiled ?

AFAIK, wxvigit and wxnviz are not compiled. With RC3 it should be possible (at least wxvdigit).

  • when I want to display raster/vector file, only mapsets are listed, but no maps in the d.rast/vect GUI form. In the command line is:
> g.mlist: command not found

GRASS need to be compiled with regex support.

Fixed in http://trac.osgeo.org/grass/changeset/35574 to use g.list on Windows instead of g.mlist.

  • I did not manage to run *any* of raster modules. Nothing happens simply. Maybe it is the g.mlist issue?

Shall I open new tickets for every of these issues separately?

Some screenshots

already fixed in http://trac.osgeo.org/grass/changeset/35574.

Martin

comment:7 by jachym, 15 years ago

in RC3:

  • wxdigit does not work - same problem (no module named grass6_wxdigit)
  • wxnviz - needs PyOpenGL - which is missing in the osgeo4w installator
  • maps are NOT displayed in the lists (prevous g.mlist issue)

So, only thing, which has changed since RC2:

  • commands are working - FIXED

in reply to:  7 comment:8 by martinl, 15 years ago

Replying to jachym:

in RC3:

  • wxdigit does not work - same problem (no module named grass6_wxdigit)
  • wxnviz - needs PyOpenGL - which is missing in the osgeo4w installator
  • maps are NOT displayed in the lists (prevous g.mlist issue)

So, only thing, which has changed since RC2:

  • commands are working - FIXED

you are lucky;-) on my machine after updating from RC2 to RC3 I am not able even to start wxGUI...

C:\Documents and Settings\landa\Plocha>grass64 -wxpython
Traceback (most recent call last):
  File "C:/OSGeo4W/apps/grass/grass-6.4.0RC3/etc/wxpython/gis_set.py", line 813,
 in <module>
    import gui_modules.gcmd as gcmd
  File "C:\OSGeo4W\apps\grass\grass-6.4.0RC3\etc\wxpython\gui_modules\gcmd.py",
line 44, in <module>
    from win32file import ReadFile, WriteFile
ImportError: DLL load failed: Uvedenß procedura nebyla nalezena.
Traceback (most recent call last):
  File "C:/OSGeo4W/apps/grass/grass-6.4.0RC3/etc/wxpython/wxgui.py", line 69, in
 <module>
    import gui_modules.utils as utils
  File "C:\OSGeo4W\apps\grass\grass-6.4.0RC3\etc\wxpython\gui_modules\utils.py",
 line 25, in <module>
    import gcmd
  File "C:\OSGeo4W\apps\grass\grass-6.4.0RC3\etc\wxpython\gui_modules\gcmd.py",
line 44, in <module>
    from win32file import ReadFile, WriteFile
ImportError: DLL load failed: Procedure not found

comment:9 by martinl, 15 years ago

Strange, from osgeo4w cmd:

python
>>> import win32file
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: Uvedenß procedura nebyla nalezena.
>>> python
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'python' is not defined
>>> import win32file
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.

If I launch python from OSGEO4W\bin\ I can import win32file without any problems.

Anyone facing to the similar problem?

in reply to:  9 ; comment:10 by jef, 15 years ago

Replying to martinl:

Strange, from osgeo4w cmd:

python
>>> import win32file
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: Uvedenß procedura nebyla nalezena.
>>> python
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'python' is not defined
>>> import win32file
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.

If I launch python from OSGEO4W\bin\ I can import win32file without any problems.

Anyone facing to the similar problem?

Are you mixing the OSGeo4W python install with another python install? Maybe PATH or PYTHONPATH point to something outside...

in reply to:  10 ; comment:11 by martinl, 15 years ago

Replying to jef:

Are you mixing the OSGeo4W python install with another python install? Maybe PATH or PYTHONPATH point to something outside...

Right, %PYTHONPATH% pointed to another version of Python. Fixed, but the problem remains

C:\Documents and Settings\landa>c:\OSGeo4W\bin\python.exe
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32file
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: Uvedenß procedura nebyla nalezena.

But if I run c:\OSGeo4W\bin\python.exe directly (launched from Total Commander) I can import win32file module without problem. Some Windows magic?;-)

in reply to:  11 comment:12 by martinl, 15 years ago

Replying to martinl:

Replying to jef:

Are you mixing the OSGeo4W python install with another python install? Maybe PATH or PYTHONPATH point to something outside...

Right, %PYTHONPATH% pointed to another version of Python. Fixed, but the problem remains

OK, sorry for the noise. My fault, I checked sys.path which includes more version of Python, so python tried to import module compiled by another version. Problem solved. Thanks for help.

comment:13 by jef, 15 years ago

initial issue is fixed in grass-6.4.0RC3-1 g.mlist and regex support is there in grass-6.4.0RC3-2

grass6_wxgui.pyd and grass6_nviz.pyd are there now too (build with handcrafted setup.py for distutils using MSVC7.1 - like python), link fine, loads fine, but still doesn't seem to work.

I see following output in the Command Output tab:

Traceback (most recent call last):
  File "C:\OSGeo4W\apps\grass\grass-6.4.0RC3\etc\wxpython\gui_modules\toolbars.py", line 1067, in OnSelectMap

self.StartEditing(self.layers[selection])
  File "C:\OSGeo4W\apps\grass\grass-6.4.0RC3\etc\wxpython\gui_modules\toolbars.py", line 1099, in StartEditing

self.parent.digit = Digit(mapwindow=self.parent.MapWindow)
  File "C:\OSGeo4W\apps\grass\grass-6.4.0RC3\etc\wxpython\gui_modules\vdigit.py", line 685, in __init__

VDigit.__init__(self, mapwindow)
  File "C:\OSGeo4W\apps\grass\grass-6.4.0RC3\etc\wxpython\gui_modules\vdigit.py", line 223, in __init__

mapwindow)
  File "C:/OSGeo4W/apps/grass/grass-6.4.0RC3\etc\wxpython\vdigit\grass6_wxvdigit.py", line 327, in __init__

this = _grass6_wxvdigit.new_Digit(*args)

Any ideas?

in reply to:  13 ; comment:14 by martinl, 15 years ago

Replying to jef:

> 
> this = _grass6_wxvdigit.new_Digit(*args)
> }}}

Any ideas?

Please, try to compile the wxvdigit extension with the patch

http://trac.osgeo.org/grass/changeset/35804

Martin

in reply to:  14 ; comment:15 by jef, 15 years ago

Replying to martinl:

Replying to jef:

> 
> this = _grass6_wxvdigit.new_Digit(*args)
> }}}

Any ideas?

Please, try to compile the wxvdigit extension with the patch

Sorry for the late response. Already tried that, it just changes the message to complain about "wxWindow *" instead of "void *".

Jürgen

in reply to:  15 ; comment:16 by martinl, 15 years ago

Replying to jef:

[...]

Sorry for the late response. Already tried that, it just changes the message to complain about "wxWindow *" instead of "void *".

sorry for ignorance, who can I compile wxvdigit on my computer? It could speed up fixing bugs - not to border everytime. Thanks a lot for taking care about grass package in osgeo4w package!

Martin

in reply to:  16 ; comment:17 by martinl, 15 years ago

Replying to martinl:

sorry for ignorance, who can I compile wxvdigit on my computer? It could speed up fixing bugs - not to border everytime. Thanks a lot for taking care about grass package in osgeo4w package!

to be more clear I meant to obtain a receipt to compile wxvdigit extension for grass package.

Martin

by jef, 15 years ago

Attachment: vdigit-vc-build.tar.bz2 added

distutils setup.pys and package batch file

in reply to:  17 comment:18 by jef, 15 years ago

Replying to martinl:

to be more clear I meant to obtain a receipt to compile wxvdigit extension for grass package.

I initially compiled with Visual C++ 2008 Express Edition, which led to similar results. Suspecting subtle compiler incompabilities I switched to Visual C++ 7.1, which is what OSGeo4W's python is compiled with and the default for distutils. Obviously that didn't help either.

I have attached what I use to build the extensions from the command prompt started with OSGeo4W-vc7.bat. But I'm not sure if it's complete.

by jef, 15 years ago

Attachment: OSGeo4W-vc7.bat added

batch file to get a command prompt with VC7 in the OSGeo4W environment

comment:19 by hamish, 15 years ago

Hi, just attempting my first OSGeo4W GRASS install. Downloaded today.

packaging issues re. the wxpython GUI & epsg file:

wxPython Startup: [Create new location from EPSG code] Error window:

"Unable to read EPSG codes: [Errno 2] No such file or directory: u'/c/OSGeo4W/share/proj\\epsg'

[Ok], Choose EPSG Code window comes up.

Path to the EPSG-codes file: [c/OSGeo4W/share/proj\epsg]

[Browse], find it in the above location, [Ok]

Error window:

Unable to read EPSG codes: string index out of range

[Ok]

but if I know the number and put it in, it accepts it and expands to the correct +proj terms. (I tried # 4326 ll/wgs84)

So it's just the code browser which is unhappy in the end. But without browsing to fix the "/c/...\epsg" to "C:\...\epsg" it gives me a Traceback error in the DOS console (line 1567 KeyError: 4326).


the rest is probably generic wxPy GUI RFE issues, but while I'm at it...

Set default region extent and resolution window: [tab] does not advance from North box to S -> W -> E -> Res. :(

no preview on map-of-the-world, and can't drag a semitransparent box to set NSWE values automatically. :(


Trying again with EPSG # 27200 (NZMG). Select datum transforms: drop down menu with 1,2,3. That's not very clear: perhaps the descriptive text could be bolded or in a box with a brighter background or someway to highlight that is the pertinent info.


The GRASS GIS Layer Manager window still says '(Experimental Prototype)' in the title bar. I thought we already got rid of that? [this is 6.4.0rc3]

cheers, Hamish

in reply to:  19 comment:20 by martinl, 15 years ago

Replying to hamish:

[...]

The GRASS GIS Layer Manager window still says '(Experimental Prototype)' in the title bar. I thought we already got rid of that? [this is 6.4.0rc3]

'Experimental Prototype' removed from the title in http://trac.osgeo.org/grass/changeset/35980.

in reply to:  19 ; comment:21 by martinl, 15 years ago

Replying to hamish:

wxPython Startup: [Create new location from EPSG code] Error window:

> "Unable to read EPSG codes: [Errno 2] No such file or directory: u'/c/OSGeo4W/share/proj\\epsg'

[Ok], Choose EPSG Code window comes up.

Path to the EPSG-codes file: [c/OSGeo4W/share/proj\epsg]

[Browse], find it in the above location, [Ok]

Error window:

> Unable to read EPSG codes: string index out of range

[Ok]

but if I know the number and put it in, it accepts it and expands to the correct +proj terms. (I tried # 4326 ll/wgs84)

So it's just the code browser which is unhappy in the end. But without browsing to fix the "/c/...\epsg" to "C:\...\epsg" it gives me a Traceback error in the DOS console (line 1567 KeyError: 4326).

Hopefully fixed in http://trac.osgeo.org/grass/changeset/35981.

Martin

in reply to:  19 ; comment:22 by martinl, 15 years ago

Replying to hamish:

Set default region extent and resolution window: [tab] does not advance from North box to S -> W -> E -> Res. :(

fixed in http://trac.osgeo.org/grass/changeset/35987

no preview on map-of-the-world, and can't drag a semitransparent box to set NSWE values automatically. :(

Please report the wish in GRASS tracker.

Martin

in reply to:  22 comment:23 by hamish, 15 years ago

Replying to martinl:

Replying to hamish:

no preview on map-of-the-world, and can't drag a semitransparent box to set NSWE values automatically. :(

Please report the wish in GRASS tracker.

filed as # 504 http://trac.osgeo.org/grass/ticket/504

in reply to:  19 ; comment:24 by hamish, 15 years ago

Replying to hamish:

Hi, just attempting my first OSGeo4W GRASS install. Downloaded today.

packaging issues re. the wxpython GUI & epsg file:

wxPython Startup: [Create new location from EPSG code] Error window:

"Unable to read EPSG codes: [Errno 2] No such file or directory: u'/c/OSGeo4W/share/proj\\epsg'

[Ok], Choose EPSG Code window comes up.

Path to the EPSG-codes file: [c/OSGeo4W/share/proj\epsg]

[Browse], find it in the above location, [Ok]

Error window:

Unable to read EPSG codes: string index out of range

[Ok]

but if I know the number and put it in, it accepts it and expands to the correct +proj terms. (I tried # 4326 ll/wgs84)

So it's just the code browser which is unhappy in the end. But without browsing to fix the "/c/...\epsg" to "C:\...\epsg" it gives me a Traceback error in the DOS console (line 1567 KeyError: 4326).

Martin:

Hopefully fixed in http://trac.osgeo.org/grass/changeset/35981.

Hi,

similar problems in the Tcl/Tk GUI. From the startup screen:

Define new locations with ... [EPSG codes]

Path to the EPSG-codes file: /c/OSGeo4W/share/proj/epsg
EPSG code number of projection __________ [Browse]

if you click "browse EPSG codes", you get an error that the file can't be found. If you browse for the EPSG file, the path becomes C:/OSGeo4W/share/proj/epsg and then it all works: ie the nice code table browsing, searching, & grabbing.

Hamish

in reply to:  24 ; comment:25 by marisn, 15 years ago

Replying to hamish:

Path to the EPSG-codes file: /c/OSGeo4W/share/proj/epsg

if you click "browse EPSG codes", you get an error that the file can't be found. If you browse for the EPSG file, the path becomes C:/OSGeo4W/share/proj/epsg and then it all works: ie the nice code table browsing, searching, & grabbing.

Path in Tcl/Tk is taken from env variable: GRASS_PROJSHARE that is set during compilation(?). Make it correct on Windows and there will be no error messages.

in reply to:  25 comment:26 by hamish, 15 years ago

Replying to hamish:

if you click "browse EPSG codes", you get an error that the file can't be found. If you browse for the EPSG file, the path becomes C:/OSGeo4W/share/proj/epsg and then it all works: ie the nice code table browsing, searching, & grabbing.

Replying to marisn:

Path in Tcl/Tk is taken from env variable: GRASS_PROJSHARE that is set during compilation(?). Make it correct on Windows and there will be no error messages.

usually set in ./configure with --with-proj-share=/usr/share/proj or so. I think that only sets the path for the EPSG codes browser/ search GUI; g.proj uses the PROJ4-linked version regardless of what you set that path to. Not sure if things have changed though.

Hamish

comment:27 by hamish, 15 years ago

ok, your comment is now sinking in. The OSGeo4W package should set GRASS_PROJSHARE=C:/OSGeo4W/share/proj/epsg. (or wherever the user puts it instead of "C:/OSGeo4W")

wxpython/gui_modules/location_wizard.py looks for GRASS_PROJSHARE. lib/init/epsg_option.tcl does too.

Hamish

in reply to:  21 ; comment:28 by hamish, 15 years ago

Replying to martinl:

Replying to hamish:

[wxPython location wizard]

So it's just the code browser which is unhappy in the end. But without browsing to fix the "/c/...\epsg" to "C:\...\epsg" it gives me a Traceback error in the DOS console (line 1567 KeyError: 4326).

Replying to martinl:

Hopefully fixed in http://trac.osgeo.org/grass/changeset/35981.

right. I've dropped in the wxpython/ dir from releasebranch_6_4 and it seems good, I see the list of codes.

but "Search in description" doesn't seem to work. Should the [Browse EPSG Codes] button there be renamed [Search] ? clicking that refreshes the list, but it is still at the top. or do I just press enter in the search text entry box? (does nothing)

If I type in the code manually, everything seems to work, location is created fine, including correct datum transform questions.

Hamish

comment:29 by neteler, 15 years ago

The files in attached vdigit-vc-build.tar.bz2 and the changes in diff have been submitted to GRASS 6.4.0svn, 6.5.svn and 7.svn.

Markus

in reply to:  28 comment:30 by martinl, 15 years ago

Replying to hamish:

but "Search in description" doesn't seem to work.

hopefully fixed in r36346.

Should the [Browse EPSG Codes] button there be renamed [Search] ? clicking that refreshes the list, but it is still at the top. or do I just press enter in the search text entry box? (does nothing)

OK, it was confusing. The button renamed to "Reload EPGS codes". Martin

comment:32 by hamish, 15 years ago




Hi,

I have looked through the entire bug report and AFAICT these are the issues commented upon that remain open with the latest 6.4.0svn osgeo4w binary package release:

  • osgeo4w\bin\grass64.bat does not accept --help (or other) parameter.
  • wx-nviz (no error message, when you switch the monitor to 3D view, nothing happens). Cog and O/I icons come up and overlap the eyeball and full-rerender icons in top left of the view window toolbar. starting with a blank map display a "Please wait, loading data..." grey box comes up in the map display. but nothing.
  • wx-vdigit: [NEW] toolbar comes up but always "No vector map selected for editing.". In layer list I can choose "Start editing" and a "please wait while map is opened for editing" message comes up on the bottom status bar, but the "Stop editing" menu item never ungreys.

thanks, Hamish

comment:33 by hamish, 15 years ago

Resolution: fixed
Status: newclosed

the three open issues for this ticket are also seen in the stand-alone installer, so filed in the main grass bug tracker as

http://trac.osgeo.org/grass/ticket/585 http://trac.osgeo.org/grass/ticket/586 http://trac.osgeo.org/grass/ticket/587

closing this bug.

Hamish

in reply to:  33 comment:34 by jef, 15 years ago

Replying to hamish:

closing this bug.

I didn't have the time (and nerve), neither to tell apart the actual osgeo4w bugs from upstream bugs, nor to check which have been fixed in the latest upload.

Thanks much for looking.

Note: See TracTickets for help on using tickets.