<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;" bidimailui-charset-is-forced="true"
    bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 03/15/2015 07:26 AM, Pedro Camargo
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAP=p+Yv-G71MGZ6vhvJxoYyiLa7NcE3Om0UOx=cw31=N482nPg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi Sittichai and Micha,<br>
              <br>
               <br>
              <br>
            </div>
            I just came back from a conference, thus back to this issue.<br>
            <br>
            <br>
          </div>
          I tried many configurations for the code, including the
          following <br>
          <br>
          gisdbase = os.path.join(os.getenv('APPDATA', 'grassdata'))<br>
          <br>
          and<br>
          <br>
          gisdbase = os.path.join('J:/<span class="im">MY_PROJECT</span>/GRASS/')<br>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
    I'm not an expert in python, but I think you need something like:<br>
    <br>
    gisdbase = os.path.join("J:/","MY_PROJECT","GRASS")<br>
    <br>
    Then, of course, run the grass.init function<br>
    <br>
    <blockquote
cite="mid:CAP=p+Yv-G71MGZ6vhvJxoYyiLa7NcE3Om0UOx=cw31=N482nPg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>and<br>
          <br>
          gisdbase='J:\<span class="im">MY_PROJECT</span>\GRASS'<br>
          <br>
        </div>
        and<br>
        <div><br>
          gisdbase = os.path.join(os.getenv('APPDATA')+
          "/GRASS6/grassrc6")<br>
          <br>
          <br>
        </div>
        <div>For all these, the output was the same, and created a file
          in the temp folder as below.<br>
          <br>
          <br>
          c:\users\pedro\appdata\local\temp\tmprdjnow<br>
          -1073741515<br>
          <br>
        </div>
        <div>Any other suggestions?<br>
          <br>
        </div>
        <div>Thanks a lot,<br>
          <br>
        </div>
        <div>Pedro<br>
        </div>
        <div><br>
          <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sat, Mar 7, 2015 at 4:29 AM, Study <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:sittichai.ocu@gmail.com" target="_blank">sittichai.ocu@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="auto">
              <div>Hi Predo<br>
                <br>
                <br>
              </div>
              <span class="">
                <div><br>
                  On BE2558/03/07, at 15:39, Micha Silver <<a
                    moz-do-not-send="true"
                    href="mailto:micha@arava.co.il" target="_blank">micha@arava.co.il</a>>
                  wrote:<br>
                  <br>
                </div>
                <blockquote type="cite">
                  <div> <br>
                    <br>
                    <div>On 03/07/2015 08:31 AM, Pedro Camargo wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">Hi Sittichai,
                        <div><br>
                        </div>
                        <div>      The location of the database
                          is J:\MY_PROJECT\GRASS</div>
                        <div><br>
                        </div>
                        <div>Is that what you wanted to know?</div>
                        <div><br>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                    So you need to set the GISDBASE variable to the
                    above. NOT as you set in your first mail:<br>
                  </div>
                </blockquote>
                <div><br>
                </div>
              </span>Yes, as Micha said please set the GISDBASE to "<span
                style="background-color:rgba(255,255,255,0)">J:\MY_PROJECT\GRASS"</span>
              <div><br>
              </div>
              <div>Best, <br>
                <div>
                  <div><span
                      style="background-color:rgba(255,255,255,0)">-- <br>
                    </span>
                    <div dir="ltr">
                      <div dir="ltr">
                        <div><span
                            style="background-color:rgba(255,255,255,0)">■□■□■□■□■□■□■□■□■</span></div>
                        <div><span
                            style="background-color:rgba(255,255,255,0)">Dr.
                            Sittichai Choosumrong (Ph.D)<br>
                            Lecturer at Faculty of Agriculture, Natural
                            Resources and Environment,<span class=""><br>
                              Department of Natural Resources and
                              Environment, <br>
                            </span></span></div>
                        <div><span
                            style="background-color:rgba(255,255,255,0)">Geography<br>
                            99 Moo 9 Tambon Tha Pho, <br>
                            Amphoe Muang<br>
                            Phitsanulok Thailand 65000<br>
                            Office: <a moz-do-not-send="true"
                              href="tel:+66%2055%20962753"
                              target="_blank">+66 55 962753</a><br>
                          </span></div>
                        <span class="">
                          <div><span
                              style="background-color:rgba(255,255,255,0)">Mobile: <a
                                moz-do-not-send="true"
                                href="tel:+66%2095-635-8102"
                                target="_blank">+66 95-635-8102</a><br>
                            </span></div>
                          <div><span
                              style="background-color:rgba(255,255,255,0)">email: <a
                                moz-do-not-send="true"
                                href="mailto:sittichaic@nu.ac.th"
                                target="_blank">sittichaic@nu.ac.th</a><br>
                            </span></div>
                          <div><span
                              style="background-color:rgba(255,255,255,0)">■□■□■□■□■□■□■□■□■</span></div>
                        </span></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      This mail was received via Mail-SeCure System.<br>
    </blockquote>
    <br>
  </body>
</html>