Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a reason that every script I have written for GRASS in python runs twice? I start them using the GUI script launcher tool, and they all begin with:

import grass.script as grass

So nothing fancy. Still, every script always runs through twice, first one run through and then another, with the first run through locking the GUI until it finishes, and the second unlocking the GUI & displaying status update bars, etc. I've confirmed that they're running twice both by using log files & with ps -e. This happens both in GRASS 7.0 and in GRASS 6.4.2 (Ubuntu 12.04). Am I missing something obvious? If not I'll go ahead & submit a bug ticket.

share|improve this question
Sounds like an issue with the GUI trying to fire up an out of process thread, executing the script, and then getting the external thread launched. Are you using any threading or multiprocessing in your script? Have you tested via the command line to see if the issue persists? – Jay Laura Jan 22 '13 at 2:44
Sounds strange, please submit a bug report. – markusN Jan 22 '13 at 9:52
@JayLaura - no threading, no multiprocessing. I have not tried testing via command line; that does seem like a logical next step. markusN - Will do. – Nat Jan 22 '13 at 14:55

Your Answer


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

Browse other questions tagged or ask your own question.