Unexpected char error in GerberView in KICAD 9.0

Dear Kicad team,

I’m trying to open a Gerber file in KiCad, but I’m encountering multiple “Unexpected character” errors in GerberView.The ZIP file contains both .gbr and .drl files, so the necessary files seem to be present. However, the issue persists when attempting to open the Gerber files.

Pratik G

Can you load the gerbers and drills one at a time until the error occurs to narrow it down?

How old are these gerber files, and with what software were they made?

Gerber has a long history (First release August 1980, 44 years ago) and there was not much standardization in the beginning and there were some weird dialects out in the wild back then.

Gerber files are a (sort of) human readable file format, and sometimes it’s relatively easy to make it work with KiCad by modifying or adding a few lines.

Can you paste your full version info here please, you can get it from KiCad > Help > About KiCad > Copy Version Info
image

yes, i did it. but does not work.

version details.
Version: 9.0.2, release build
Libraries:
wxWidgets 3.2.6
FreeType 2.13.3
HarfBuzz 10.2.0
FontConfig 2.15.0
libcurl/8.11.1-DEV Schannel zlib/1.3.1

What do you mean by it does not work? Either it generated an error or it didn’t. Details! You don’t have problems typing do you?

i tried to open gerber file in kicad. i got below error. here i kept .gbr and .drl in zip file and try to open in gerber viewer. also try to open .gbr and .drl file. still getting below error.

Unexpected char 0x41 (A)

Unexpected char 0x43 (C)

Unexpected char 0x2C (,)

Unexpected char 0x30 (0)

Unexpected char 0x2E (.)

Unexpected char 0x35 (5)

Unexpected char 0x41 (A)

Unexpected char 0x43 (C)

Unexpected char 0x2C (,)

Such an error will occur if you try to open a drill file that is not in Gerber format.
Examples include Excellon format, or a text file that looks like this:

M72
M48
T1F00S00C0.015
...
%
T01
X0129Y01275
...
M30

Perhaps if you follow the advice of @retiredfeline above you can discover which file is the one that causes you a problem in the import process.

You don’t open the gerber file in KiCad, but in the Gerber viewer. Start the Gerber viewer from the project manager, then load the same files that are in the zip archive one by one from the viewer’s File menu (you may have to unpack the archive first, if you didn’t generate the files yourself).

yes, i tried to open one by one file. only DRL and out line i can see. but track and other information, i cant see in gerber viewer.

Are these Gerbers produced by KiCad or from somewhere else? Where were they generated? Are you trying to use gerbview to view them? Have you tried other viewers?