Skip to main content
Question

Unexpected end of file reading

  • January 16, 2025
  • 3 replies
  • 57 views

magda_cz
Contributor
Forum|alt.badge.img+2

Hi,

 

While trying to read a shapefile, I encountered the following error. Has anyone come across this issue? It stopped reading all other files:
 

  • Shapefile reader: Unexpected end of file reading 'filepath\filename.dbf'. Please report this error to Safe Software
  • GeometryFilter_InputPassThrough (TeeFactory): Failed to get block of 235 features starting at index 0
  • Failed to get block of 235 features starting at index 0

 

When I tried using the FME Data Inspector, I received the following errors:

 

  • Shapefile reader: Unexpected end of file reading 'filepath\filename.dbf''. Please report this error to Safe Software
  • FFS writer: Failed to get block of 235 features starting at index 0
  • Failed to write feature data to `C:\Users\--\AppData\Local\Temp\FFS_1736990572395_5844_DATA.ffs'
  • Failed to specify the feature index as constraints on the reader

 

Thank you for any suggestions on how this can be resolved. The file is recognized in ArcPro.

 

Thanks,

Magda

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

Is it an exceptionally large file (like in the gigabyte range)?


magda_cz
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • January 16, 2025
redgeographics wrote:

Is it an exceptionally large file (like in the gigabyte range)?

No, it’s not large. It’s 585MB. Thanks


s.jager
Influencer
Forum|alt.badge.img+16
  • Influencer
  • January 16, 2025

Sounds like there is some corruption in the DBF part of that shapefile (the DBF-part of the shapefile contains the attributes, it’s a very old file-based database format). There’s a few options you can try:

  • Since you mention it displays ok in ARcGis Pro, try exporting it from there, then see if the new shapefile works.
  • If you also have QGis, try opening the shapefile with QGis.
  • DBF files can actually be opened separately using Excel, edited, and then saved back to DBF. That might fix things as well.
  • If you do some searching, you can find several shapefile repair tools, that might help you out.

Be sure to make a backup of the original shapefile. The above might solve the corruption (if it is corruption), but in doing so might also remove vital information, so using the backup you may be able to rescue that.

Personally I never use shapefiles anymore, but Geopackages. That also removes the 8-character limit for the attribute names, and instead of a bunch of files it’s only 1. Which makes it a lot easier to share using sneakernet or email.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings