cournape/Bento

bento crash

smif1984 opened this issue · 1 comments

HI,
I have installed bento with pip. I have the following error:

davide@rigel ~/Documents/dottorato/codici/pyhd-0.0.1 $:BENTOMAKER_DEBUG=1 bentomaker help commands
File "/usr/local/lib/python2.6/dist-packages/bentomakerlib/bentomaker.py", line 368, in noexc_main
ret = main(argv)
File "/usr/local/lib/python2.6/dist-packages/bentomakerlib/bentomaker.py", line 147, in main
_wrapped_main(popts)
File "/usr/local/lib/python2.6/dist-packages/bentomakerlib/bentomaker.py", line 171, in _wrapped_main
mods = set_main()
File "/usr/local/lib/python2.6/dist-packages/bentomakerlib/bentomaker.py", line 122, in set_main
pkg = CachedPackage.get_package(BENTO_SCRIPT)
File "/usr/local/lib/python2.6/dist-packages/bento/core/package_cache.py", line 44, in get_package
return cache.get_package(filename, user_flags)
File "/usr/local/lib/python2.6/dist-packages/bento/core/package_cache.py", line 118, in get_package
return _create_package_nocached(filename, user_flags, self.db)
File "/usr/local/lib/python2.6/dist-packages/bento/core/package_cache.py", line 166, in _create_package_nocached
pkg, options = _create_objects_no_cached(filename, user_flags, db)
File "/usr/local/lib/python2.6/dist-packages/bento/core/package_cache.py", line 186, in _create_objects_no_cached
raw = raw_parse(data, filename)
File "/usr/local/lib/python2.6/dist-packages/bento/core/parser/misc.py", line 16, in raw_parse
ret = _parse(data)
File "/usr/local/lib/python2.6/dist-packages/bento/core/parser/parser.py", line 52, in parse
__PARSER = Parser()
File "/usr/local/lib/python2.6/dist-packages/bento/core/parser/parser.py", line 30, in init
debug=_DEBUG_YACC)
File "/usr/local/lib/python2.6/dist-packages/bento/private/_ply/ply/yacc.py", line 3269, in yacc
lr.pickle_table(picklefile,signature)
File "/usr/local/lib/python2.6/dist-packages/bento/private/_ply/ply/yacc.py", line 2671, in
pickle_table
outf = open(filename,"wb")
bentomaker: Error: bentomaker crashed (uncaught exception <type 'exceptions.IOError'>: [Errno 13] Permission denied: '/usr/share/parsetab').
Please report this on bento issue tracker:
http://github.com/cournape/bento/issues

Regards

Davide

Hi Davide,

Thank you for the bug report, and sorry for the crash. The short answer is that at this moment, bento should not be installed as root - I checked against this when installed from bento, but forgot to include the check in setup.py. If the issue is what I think it is, you should be ok by running bentomaker help once under root.

The underlying issue is that bento internal parser uses a file which needs to be modified the first time it is run. A proper solution would be to "pre-compile" this file at installation time, but that's one of the currently missing feature of bento.