Saturday, September 08, 2012

Gerbmerge errors

Continuing from my previous post, Installing gerbmerge on recent installation of Ubuntu Linux (12.04-LTS) causes installation to fail with error

Traceback (most recent call last):
  File "setup.py", line 41, in
    DestDir = os.path.join(DestLib, 'gerbmerge')
  File "/usr/lib/python2.7/posixpath.py", line 68, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

This is caused by variable DestLib not being set properly by following line in setup.py.

DestLib = distutils.sysconfig.get_config_var('LIBPYTHON')

Maybe with new version of python distutils.sysconfig.get_config_var('LIBPYTHON') returns nothing.

In order to fix this, change the above line to

DestLib = '/usr/local/lib/python2.7/'

If your python local library path  is different, substitute your own path in th eline above.

I'm not too good at python but maybe "sys.path" can be used to set the library path.

Please comment if this works or doesn't work for you.

4 comments:

Pedro Savoie said...

Yes

Thanks a lot for taking the time to post this. It works!

I am happy !

Anonymous said...

Yup, thanks.

Elia said...

Thank you, that was very helpful in conjunction with your other post about installing gerbmerge.

Now I have to get through the overcomplicated configuration of gerbmerge.

Cheers,
Elia

Anonymous said...

that works -- thanks a ton!