[GRASS-stats] R-GRASS error: "all connections are in use"

Juan Manuel Barreneche jumanbar at gmail.com
Fri Apr 25 17:02:34 EDT 2008


Well, thanks to you all, the problem was fixed. It turned out that
RB's suggestion was right (i updated R, only). I apologize for sending
only partial information (in fact it was because of a distraction that
i didn't put all the script, etc. in the email).

One thing caugth my attention though: every time i call readRAST6 a
warning message apears, saying:

> warnings()
$`closing unused connection 3 (gsub(" ", ":", l8))`
NULL

I suppose this is exactly the improvement that Roger B. pointed out in
his reply, and i just didn't give much importance to it. Please let me
know if there is something important to take into consideration...

Thanks again,

JM



On Fri, Apr 25, 2008 at 3:52 AM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> On Fri, 25 Apr 2008, Jarosaw Jasiewicz wrote:
>
>
> > Hi
> > This message apeeared on the begining of the loop or in somewhere in the
> iteration
> >
> > please type the full command (full loop) you have used
> >
> >
> >
> > uan Manuel Barreneche pisze:
> >
> > >  Hello list,
> > >
> > >  I'm currently using R version 2.5.0 (2007-04-23) in conjunction with
> > >  GRASS6.2.2.
> > >
> >
>
>  Please always include the output of sessionInfo(), in addition to the R
> version. spgrass6 is updated from time to time, so it may be that you are -
> for example - using an obsolete route, although you are using BIL files, so
> I guess that this is readRAST6() in a loop, as Jarek suggested.
>
>  Specifically, I think that this problem was solved in R-2.6.0 - the
> relevant news item is:
>
>     o   Connections will be closed if there is no R object referring to
>         them.  A warning is issued if this is done, either at garbage
>         collection or if all the connection slots are in use.
>
>  which means that functions do not need to close them explicitly.
>
>  Roger
>
>
>
>
> >
> > >
> > >  My goal is to use a loop to extract data from rasters created in grass
> > >  (a different raster in each simulation, created with r.cost using a
> > >  unique cost surface raster, which is deleted every time in order to
> > >  free disk space).
> > >
> > >  Percent complete:  100%
> > >  r.out.bin complete.
> > >  REMOVE [nombre]
> > >  raster
> > >  header
> > >  category
> > >  color    MISSING
> > >  history
> > >  misc
> > >  fcell    MISSING
> > >  g3dcell  MISSING
> > >  Creating BIL support files ...
> > >  Header File =
> > >  /home/mastermind/GRASSDATA/prueba/wordlclim/.tmp/torre11b1-4/nombre.hdr
> > >  World File =
> > >  /home/mastermind/GRASSDATA/prueba/wordlclim/.tmp/torre11b1-4/nombre.wld
> > >  Exporting Raster as integer values (bytes=2)
> > >  Using the Current Region settings ...
> > >  north=-34.474986
> > >  south=-34.966653
> > >  east=-55.866644
> > >  west=-56.558311
> > >  r=59
> > >  c=83
> > >
> > >  Porcentaje completado:  100%
> > >  r.out.bin complete.
> > >  Error in file(paste(fname, "wld", sep = "."), "r") :
> > >          all connections are in use
> > >
> > >  In addition, after this message every time i try a help comand (such
> > >  as ?file, ?rbind, etc...) i get the same message:
> > >  Error in file(con, "r"): all connections are in use
> > >
> > >  I've been working with R and GRASS for about 9 months and I'm not much
> > >  of a specialist, so i'm really lost here, does anybody have a clue
> > >  about the solution of this problem?
> > >
> > >  many thanks,
> > >
> > >  Juan Manuel
> > >  _______________________________________________
> > >  grass-stats mailing list
> > >  grass-stats at lists.osgeo.org
> > >  http://lists.osgeo.org/mailman/listinfo/grass-stats
> > >
> > >
> >
> > _______________________________________________
> > grass-stats mailing list
> > grass-stats at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-stats
> >
> >
> >
>
>  --
>  Roger Bivand
>  Economic Geography Section, Department of Economics, Norwegian School of
>  Economics and Business Administration, Helleveien 30, N-5045 Bergen,
>  Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>  e-mail: Roger.Bivand at nhh.no
>
>


More information about the grass-stats mailing list