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.

  • 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
  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.