|
|
|
Alfredo Alessandrini
|
HI,
I've compiled grass-6.4.0RC5 with wx-python, but I've this problem when I start it: alfredo@astore:~$ grass64 -wx Cleaning up temporary files ... Starting GRASS ... Traceback (most recent call last): File "/usr/local/grass-6.4.0RC5/etc/wxpython/gis_set.py", line 33, in <module> from gui_modules import globalvar File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/globalvar.py", line 55, in <module> CheckForWx() File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/globalvar.py", line 44, in CheckForWx except (ImportError, ValueError, wxversion.VersionError), e: UnboundLocalError: local variable 'wxversion' referenced before assignment Error in GUI startup. If necessary, please report this error to the GRASS developers. Switching to text mode now. Hit RETURN to continue... ------------------------------------------- alfredo@astore:~/archivio/GRASS_INSTALL/grass-6.4.0RC5$ ./configure --with-tcltk-includes=/usr/include/tcl8.5 --with-proj-share=/usr/share/proj --with-python --with-gdal=/usr/local/bin/gdal-config --with-ffmpeg=yes --with-ffmpeg-includes="/usr/include/libavcodec/ /usr/include/libavformat/ /usr/include/libswscale" --with-sqlite --with-postgres --with-postgres-includes=/usr/include/postgresql/ --with-wxwidgets=/usr/bin/wx-config --with-mysql-includes=/usr/include/mysql --with-opengl-libs=/usr/lib/ checking host system type... i686-pc-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for Cygwin environment... no checking for mingw32 environment... no checking for executable suffix... no checking for full floating-point support... yes checking for pwd... /bin/pwd checking for source directory... /home/alfredo/archivio/GRASS_INSTALL/grass-6.4.0RC5 checking for build directory... /home/alfredo/archivio/GRASS_INSTALL/grass-6.4.0RC5 checking for MacOSX App... no checking how to build libraries... shared checking for ranlib... ranlib checking how to run the C preprocessor... gcc -E checking if 64bit support is requested... no checking if 64bit Sparc VIS support is requested... no checking system version (for dynamic loading)... Linux-2.6.30-1-686 checking for dlopen in -ldl... yes checking for ar... ar checking for additional include dirs... checking for additional library dirs... checking for a BSD compatible install... /usr/bin/install -c checking for flex... flex checking for yywrap in -lfl... yes checking for bison... bison -y checking for ranlib... ranlib checking for ar... ar checking for env... env checking for perl... /usr/bin/perl checking for ANSI C header files... yes checking for limits.h... yes checking for termio.h... yes checking for termios.h... yes checking for unistd.h... yes checking for values.h... yes checking for f2c.h... no checking for g2c.h... no checking for sys/ioctl.h... yes checking for sys/mtio.h... yes checking for sys/resource.h... yes checking for sys/time.h... yes checking for sys/timeb.h... yes checking for sys/types.h... yes checking for sys/utsname.h... yes checking for libintl.h... yes checking for iconv.h... yes checking for langinfo.h... yes checking whether time.h and sys/time.h may both be included... yes checking for off_t... yes checking for uid_t in sys/types.h... yes checking return type of signal handlers... void checking for Cygwin environment... no checking for ftime... yes checking for gethostname... yes checking for gettimeofday... yes checking for lseek... yes checking for nice... yes checking for time... yes checking for uname... yes checking for seteuid... yes checking for setpriority... yes checking for setreuid... yes checking for setruid... no checking for drand48... yes checking for putenv... yes checking for setenv... yes checking for nanosleep... yes checking whether setpgrp takes no argument... yes checking for long long int... yes checking for W11... no checking for X... libraries , headers checking for dnet_ntoa in -ldnet... no checking for dnet_ntoa in -ldnet_stub... no checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking whether to use Curses... yes checking for curses.h... yes checking curses.h WINDOW structure component... _maxy checking for initscr in -lncurses... yes checking for keypad in -lncurses... yes checking for gtty in -lcompat... no checking for gtty in -lbsd-compat... yes checking for library containing cuserid... none required checking for xdrmem_create... yes checking for asprintf... yes checking for atan... no checking for atan in -lm... yes checking for dlsym... no checking for dlsym in -ldl... yes checking for iconv... yes checking for socket... yes checking for location of zlib includes... checking for zlib.h... yes checking for location of zlib library... checking for deflate in -lz... yes checking for location of External PROJ.4 includes... checking for proj_api.h... yes checking External PROJ.4 version... 461 checking for location of External PROJ.4 library... checking for pj_get_def in -lproj... yes checking for location of External PROJ.4 data files... /usr/share/proj checking for /usr/share/proj/epsg... yes checking for nad2bin... /usr/bin/nad2bin checking whether to use regex... yes checking for location of regex includes... checking for regex.h... yes checking for location of regex library... checking for regcomp... yes checking whether to use Readline... no checking whether to use JPEG... yes checking for location of JPEG includes... checking for jpeglib.h... yes checking for location of JPEG library... checking for jpeg_start_compress in -ljpeg... yes checking whether to use GDAL... yes checking for gdal-config... /usr/local/bin/gdal-config checking whether to use TIFF... yes checking for location of TIFF includes... checking for tiffio.h... yes checking for location of TIFF library... checking for TIFFOpen in -ltiff... yes checking whether to use PNG... yes checking for location of PNG includes... checking for png.h... yes checking for location of PNG library... checking for png_read_image in -lpng... yes checking whether to use PostgreSQL... yes checking for location of PostgreSQL includes... /usr/include/postgresql/ checking for libpq-fe.h... yes checking for location of PostgreSQL library... checking for PQsetdbLogin in -lpq... yes checking for PQcmdTuples in -lpq... yes checking whether to use MySQL... no checking whether to use SQLite... yes checking for location of SQLite includes... checking for sqlite3.h... yes checking for location of SQLite library... checking for sqlite3_open in -lsqlite3... yes checking whether to use FFMPEG... yes checking for location of FFMPEG includes... /usr/include/libavcodec/ /usr/include/libavformat/ /usr/include/libswscale checking for avcodec.h... yes checking for avformat.h... yes checking for swscale.h... yes checking for location of FFMPEG library... checking for av_free in -lavutil... yes checking for avcodec_init in -lavcodec... yes checking for av_set_parameters in -lavformat... yes checking whether to use OpenGL... yes checking for location of OpenGL includes... checking for GL/gl.h... yes checking for GL/glu.h... yes checking for location of OpenGL library... /usr/lib/ checking for glBegin in -lGL... yes checking for gluBeginCurve in -lGLU... yes checking for glXCreatePbuffer... yes checking for glXCreateGLXPixmap... yes checking whether to use Tcl/Tk... yes checking for location of Tcl/Tk includes... /usr/include/tcl8.5 checking for tcl.h... yes checking for tk.h... yes checking Tcl version... 8.5 checking Tk version... 8.5 checking for location of Tcl/Tk library... checking for Tcl_Init in -ltcl... no checking for Tcl_Init in -ltcl... no checking for Tcl_Init in -ltcl8.5... yes checking for Tk_MainWindow in -ltk... no checking for Tk_MainWindow in -ltk... no checking for Tk_MainWindow in -ltk8.5... yes checking whether to use ODBC... no checking whether to use FFTW... yes checking for location of FFTW includes... checking for fftw3.h... no checking for fftw.h... yes checking for location of FFTW library... checking for fftw_execute in -lfftw3... no checking for fftwnd_one in -lfftw... yes checking whether to use BLAS... no checking whether to use LAPACK... no checking whether to use Motif... no checking whether to use Cairo... no checking whether to use GLw... no checking whether to use FreeType... no checking whether to use NLS... no checking whether to use C++... no checking whether to use openDWG... no checking if system supports Large Files at all... no checking whether to use Python... yes checking for python-config... /usr/bin/python-config checking for Python.h... yes checking for swig... /usr/bin/swig checking whether to use wxWidgets... yes checking for wx-config... /usr/bin/wx-config checking wxWidgets version... 2.8.10 checking for wx/wxprec.h... yes creating ./config.status creating include/Make/Grass.make creating include/Make/Platform.make creating include/version.h creating include/winname.h creating swig/perl/Makefile.PL creating swig/perl2/make.pl creating grass.pc creating include/config.h include/config.h is unchanged Copying config.status to config.status.i686-pc-linux-gnu GRASS is now configured for: i686-pc-linux-gnu Source directory: /home/alfredo/archivio/GRASS_INSTALL/grass-6.4.0RC5 Build directory: /home/alfredo/archivio/GRASS_INSTALL/grass-6.4.0RC5 Installation directory: ${prefix}/grass-6.4.0RC5 Startup script in directory: ${exec_prefix}/bin C compiler: gcc -g -O2 C++ compiler: Building shared libraries: yes 64bit support: no OpenGL platform: X11 MacOSX application: no NVIZ: yes BLAS support: no C++ support: no Cairo support: no DWG support: no FFMPEG support: yes FFTW support: yes FreeType support: no GDAL support: yes GLw support: no JPEG support: yes LAPACK support: no Large File support (LFS): no Motif support: no MySQL support: no NLS support: no ODBC support: no OGR support: yes OpenGL support: yes PNG support: yes PostgreSQL support: yes Python support: yes Readline support: no SQLite support: yes Tcl/Tk support: yes wxWidgets support: yes TIFF support: yes X11 support: yes _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user |
|
Glynn Clements
|
[CC to grass-dev] Alfredo Alessandrini wrote: > I've compiled grass-6.4.0RC5 with wx-python, but I've this problem > when I start it: > > alfredo@astore:~$ grass64 -wx > Cleaning up temporary files ... > Starting GRASS ... > Traceback (most recent call last): > File "/usr/local/grass-6.4.0RC5/etc/wxpython/gis_set.py", line 33, in <module> > from gui_modules import globalvar > File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/globalvar.py", > line 55, in <module> > CheckForWx() > File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/globalvar.py", > line 44, in CheckForWx > except (ImportError, ValueError, wxversion.VersionError), e: > UnboundLocalError: local variable 'wxversion' referenced before assignment I'm sure that this has been reported before, but I can't find anything in Trac. The problem is that the code tries to handle failing to import wxversion and wxversion-specific exceptions using the same "try" block: try: import wxversion wxversion.select(str(minVersion[0]) + '.' + str(minVersion[1])) ... except (ImportError, ValueError, wxversion.VersionError), e: ... Obviously, if the "import wxversion" fails, wxversion.VersionError isn't going to resolve. FWIW, the same problem exists in trunk. The code should probably look something like: try: import wxversion try: wxversion.select(str(minVersion[0]) + '.' + str(minVersion[1])) ... except (ValueError, wxversion.VersionError), e: ... except ImportError, e: ... -- Glynn Clements <[hidden email]> _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user |
||||||||||||||||
|
Martin Landa
|
Hi,
2009/10/12 Glynn Clements <[hidden email]>: > Obviously, if the "import wxversion" fails, wxversion.VersionError > isn't going to resolve. > > FWIW, the same problem exists in trunk. > > The code should probably look something like: > > try: > import wxversion > try: > wxversion.select(str(minVersion[0]) + '.' + str(minVersion[1])) > ... > except (ValueError, wxversion.VersionError), e: > ... > > except ImportError, e: right, hopefully fixed r39494. Martin -- Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |