[Qgis-user] Failing to open a valid shp file

William Kyngesburye woklist at kyngchaos.com
Thu Apr 12 17:59:10 PDT 2012


There is a hard limit on OS X to how many files a single process (ie QGIS app) can have open at a time.  I believe it's 256, which when you count the 3 basic files of a shapefile set, means you can have 85 shapefiles in a project.

When QGIS tries to open that 86th shapefile it can only open 2 of the 3 files, and without the 3rd file it becomes unrecognizable, thus the misleading error.

Last time I looked into this, it unfortunately couldn't be globally changed for all applications.  It's possible to override the limit for individual processes, but the method only works from a Terminal, which is not the normal way to start applications.

It may be possible now with launchctl.  Try running this command in a Terminal, then run QGIS normally and open your project with >85 shapefiles:

launchctl limit maxfiles 1024

On Apr 12, 2012, at 6:48 PM, Jeremy Dunck wrote:

> I'm using the shapefile found here:
> 
> http://www.flsenate.gov/Session/Redistricting/Plan/s016s9030
> specifically:
> http://www.flsenate.gov/PublishedContent/Session/Redistricting/Plans/S016S9030/S016S9030_shp.zip
> 
> If I open just this one file, it works.  If I open it in a project w/
> a bunch of other shapes, it fails - most of the time.  I repeatedly
> tried opening the same file (without changing anything on the
> filesystem) and finally, it worked.  The only difference I can see is
> that I removed a different shp from the project before adding this one
> succeeded.
> 
> The error I'm getting is:
> "/path/to/20120401/s000s9008.shp is not a valid or recognized data source"
> 
> I've attached a screenshot of my About page; this is on Mac 10.7.3.
> 
> I tried to see if there was a logfile but no dice:
> $ sudo lsof | grep -i qgis
> 
> How can I troubleshoot this?
> <Screen Shot 2012-04-12 at 4.37.47 PM.png>_______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy





More information about the Qgis-user mailing list