Opened 16 years ago

Closed 15 years ago

#539 closed defect (fixed)

Error on "Display Map" in wxpython

Reported by: cnielsen Owned by: grass-dev@…
Priority: major Milestone: 6.5.0
Component: wxGUI Version: svn-develbranch6
Keywords: Cc: jef@…
CPU: Unspecified Platform: MSWindows Vista

Description

When I click display map in wxpython, nothing happens. The following error appears in command output: Traceback (most recent call last):

File "c:\Programs\GIS\osgeo4w\apps\grass\grass-6.5.svn\etc

\wxpython\gui_modules\mapdisp.py", line 541, in OnDraw

self.MapWindow.UpdateMap(render=False)

File "c:\Programs\GIS\osgeo4w\apps\grass\grass-6.5.svn\etc

\wxpython\gui_modules\mapdisp_window.py", line 661, in UpdateMap

self.Draw(self.pdc, self.img, drawid=id)

File "c:\Programs\GIS\osgeo4w\apps\grass\grass-6.5.svn\etc

\wxpython\gui_modules\mapdisp_window.py", line 289, in Draw

pdc.DrawBitmap(bitmap, wx.Point(coords[0], coords[1]), True) # draw the composite map

File "C:\Programs\GIS\OSGeo4W\apps\Python25\lib\site-

packages\wx-2.8-msw-unicode\wx\_gdi.py", line 7526, in DrawBitmap

return _gdi_.PseudoDC_DrawBitmap(*args, kwargs) TypeError : in method 'PseudoDC_DrawBitmap', expected argument 3 of type 'int'

This is a build of develbranch_6 within the osgeo4w tree on vista.

Attachments (1)

wxPython.diff.gz (50.8 KB ) - added by jef 16 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by cnielsen, 16 years ago

As point of reference, 6.4.0RC3 worked fine.

comment:2 by cnielsen, 16 years ago

Same error occurs on trunk

comment:3 by hamish, 16 years ago

Milestone: 6.4.06.5.0

comment:4 by cnielsen, 16 years ago

Still no resolution to this bug, perhaps it relates to the change from mapdisp.py

pdc.DrawBitmap(bitmap, coords[0], coords[1], True) # draw the composite map

To mapdisp_window.py:

pdc.DrawBitmap(bitmap, wx.Point(coords[0], coords[1]), True) # draw the composite map

The error says "expected argument 3 of type 'int'" and it seems that it is still looking for "coords[1]" when in the latter case it is instead getting "true" since "coords[1]" has been put within wx.Point as part of arg 2.

Trying to trace this back I noticed that the grass-6.5.svn/etc/wxpython/vdigit folder is empty. Apparently vdigit isn't compiling at all. Ideas?

comment:5 by cnielsen, 16 years ago

I found the README, apparently I need --python and --wxwidgets. If I'm understanding this correctly, this ticket should probably be closed.

comment:6 by cnielsen, 16 years ago

On second thought, you shouldn't need (and didn't need before) support for vdigit just to display a map. It seems that it got incorporated as a requirement rather than an option somewhere along the line.

in reply to:  7 ; comment:8 by cnielsen, 16 years ago

Cc: jef@… added

Replying to jef:

see also http://trac.osgeo.org/osgeo4w/ticket/37#comment:13 ff

That ticket includes information about vdigit and nviz but they're still not functioning in the osgeo4w builds right?

Do I need to run package.cmd to make a functioning GUI? If so I'm missing h:\windows\wxPython-src-2.8.9.1 and my attempts to get it from the wxpython/wxwidgets svn were unsuccessful...

I'm still missing something, but I see that you didn't need --python or --wxwidgets in your osgeo4w builds.

in reply to:  8 ; comment:9 by jef, 16 years ago

Replying to cnielsen:

Replying to jef:

see also http://trac.osgeo.org/osgeo4w/ticket/37#comment:13 ff

That ticket includes information about vdigit and nviz but they're still not functioning in the osgeo4w builds right?

Yes.

Do I need to run package.cmd to make a functioning GUI? If so I'm missing h:\windows\wxPython-src-2.8.9.1 and my attempts to get it from the wxpython/wxwidgets svn were unsuccessful...

That's the wxPython build. I started off with http://www.wxpython.org/download.php#binaries there (including the devel packages), but IIRC I couldn't get the libraries to work.

So I resorted to building wxPython with VC++ 2008 Express Edition - leading to the described problems. Later I tried with VS2003, which didn't significantly changed anything.

I'm still missing something, but I see that you didn't need --python or --wxwidgets in your osgeo4w builds.

Exactly. GRASS is not aware of distutils, which AFAIK should be used to build python extensions.

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

build script package.cmd for wxPython:

set WXWIN=%CD%
set WXDIR=%CD%
set PATH=%PATH%;%WXWIN%\lib\vc_dll

cd build\msw
nmake -f makefile.vc OFFICIAL_BUILD=1 BUILD=release SHARED=1 MONOLITHIC=0 USE_XML=1 USE_OPENGL=1 USE_GDIPLUS=1 UNICODE=1 MSLU=1 HYBRID=1

cd %WXWIN%\contrib\build\stc
nmake -f makefile.vc OFFICIAL_BUILD=1 BUILD=release SHARED=1 MONOLITHIC=0 USE_XML=1 USE_OPENGL=1 USE_GDIPLUS=1 UNICODE=1 MSLU=1 HYBRID=1

cd %WXWIN%\contrib\build\gizmos
nmake -f makefile.vc OFFICIAL_BUILD=1 BUILD=release SHARED=1 MONOLITHIC=0 USE_XML=1 USE_OPENGL=1 USE_GDIPLUS=1 UNICODE=1 MSLU=1 HYBRID=1

cd %WXWIN%\wxPython
python setup.py build_ext --inplace UNICODE=1 FINAL=1 -D WXUSINGDLL
python setup.py install UNICODE=1 FINAL=1 

cd %WXWIN%

by jef, 16 years ago

Attachment: wxPython.diff.gz added

comment:11 by cnielsen, 15 years ago

Resolution: fixed
Status: newclosed

original error now fixed

Note: See TracTickets for help on using tickets.