Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to learn how to use ps.map in GRASS. I thought that running it in interactive mode from the command line would be a good place to start, but I'm getting the following error:

> ps.map                                                                                 ~
Traceback (most recent call last):
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_modules/menuform.py", line 59, in <module>
    import globalvar
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_modules/globalvar.py", line 76, in <module>
    import wx
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/python/wx/__init__.py", line 45, in <module>
    from wx._core import *
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py", line 4, in <module>
    import _core_
ImportError: dlopen(/Applications/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core_.so, 2): no suitable image found.  Did find:
    /Applications/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core_.so: mach-o, but wrong architecture

UPDATE: In response to Markus's comment that terminal messages on GRASS startup might help to diagnose the problem, the following two chunks provides all terminal output from GRASS startup.

Chunk 1: from starting /Applications/Grass-6.4.app to GUI Startup window.

Last login: Sat Mar 23 10:08:40 on ttys002
gregory@Gregorys-MacBook> '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/osascript) is code signed with entitlements
Python 2.6.7 found.
Cleaning up temporary files ...
Starting GRASS ...

Chunk 2: from selecting a location/mapset in the GUI startup window and clicking "Start GRASS".

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \ 
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ / 
       \____/_/ |_/_/  |_/____/____/   \____/___//____/  

Welcome to GRASS 6.4.2 (2012) 
GRASS homepage:                          http://grass.osgeo.org/
This version running thru:               shell (/bin/zsh)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
If required, restart the GUI with:       g.gui wxpython
When ready to quit enter:                exit

gregory@Gregorys-MacBook> Mar 23 11:31:05 Gregorys-MacBook.local pythonw2.6[2520] <Error>: CGContextRestoreGState: invalid context 0x0
Mar 23 11:31:05 Gregorys-MacBook.local pythonw2.6[2520] <Error>: CGContextRestoreGState: invalid context 0x0
Mar 23 11:31:05 Gregorys-MacBook.local pythonw2.6[2520] <Error>: CGContextRestoreGState: invalid context 0x0
Mar 23 11:31:05 Gregorys-MacBook.local pythonw2.6[2520] <Error>: CGContextRestoreGState: invalid context 0x0
Mar 23 11:31:05 Gregorys-MacBook.local pythonw2.6[2520] <Error>: CGContextRestoreGState: invalid context 0x0
share|improve this question
    
Which Mac OS X version do you use? "wrong architecture" looks like a version mixture. –  markusN Mar 22 '13 at 16:31
    
@markusN Mac OS X version 10.8.3 Build 12D78. As for the GRASS version, I just did a fresh install of the required frameworks and GRASS itself from kyngchaos.com a few days ago. –  pyrogerg Mar 22 '13 at 16:44

2 Answers 2

I was able to start ps.map in interactive mode by specifying an output file. The syntax of the successful command was ps.map output=out_file.ps.

share|improve this answer

Did you install the framework packages first, as suggested on http://grass.osgeo.org/download/software/mac-osx/ ? This may solve the problem.

share|improve this answer
    
I installed all the frameworks before I installed GRASS. The error log, presented in the original post, suggests that it's looking for an image not in a framework but in python/wx. –  pyrogerg Mar 22 '13 at 2:45
    
Just noticed that the GRASS version I installed from kyngchaos is known to have issues with the Python GUI in Mountain Lion, but it says that the command line modules should work fine. Ref: kyngchaos.com/software/grass –  pyrogerg Mar 22 '13 at 17:24
    
I have notified him about this problem. Let's see... –  markusN Mar 22 '13 at 19:37
    
William says: "Sounds like what's happening is that Python is running in 64bit mode somehow to run the option mini-gui interactive thing. I tried it on a non-dev OS X 10.8, no error. Terminal messages on GRASS startup might help isolate the problem." –  markusN Mar 23 '13 at 0:58
    
I edited the post to include the terminal messages on GRASS startup. –  pyrogerg Mar 23 '13 at 1:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.