Hi Nenad.

You are using an old version of the INSTALL file. Please see
http://invenio-software.org/browser/INSTALL for an updated version.

As for the Yes, I know!, you can append the option --yes-i-know to
your inveniocfg command and it will have the same effect.

Cheers.
Benoit.

On Mon, Sep 17, 2012 at 1:58 PM, Nenad Steric <[email protected]> wrote:
> Hallo,
>
> i have tried to install invenio according to
> http://cdsware.cern.ch/download/INSTALL
>
> inveniocfg --run-unit-tests has 2 failing test because of a wrong db which
> it tries to access.
> inveniocfg --run-regression-tests fails at the beginning
> File "./bin/inveniocfg", line 33, in <module>
> main()
> File "/usr/local/lib/python2.7/dist-packages/invenio/inveniocfg.py", line
> 1177, in main
> cli_cmd_run_regression_tests(conf)
> File "/usr/local/lib/python2.7/dist-packages/invenio/inveniocfg.py", line
> 750, in cli_cmd_run_regression_tests
> build_and_run_regression_test_suite()
> File "/usr/local/lib/python2.7/dist-packages/invenio/testutils.py", line
> 355, in build_and_run_regression_test_suite
> module = __import__('invenio.' + base, globals(), locals(), ['TEST_SUITE'])
> File
> "/usr/local/lib/python2.7/dist-packages/invenio/webstyle_regression_tests.py",
> line 28, in <module>
> import mechanize
> ImportError: No module named mechanize
>
>
> with create-demo-site i get
>
> ------
> ERROR: You must run "webcoll" as the user set up in your
> CFG_BIBSCHED_PROCESS_USER (seems to be "www-data").
>
> You may want to do "sudo -u www-data webcoll ..." to do so.
>
> If you think this is not right, please set CFG_BIBSCHED_PROCESS_USER
> appropriately and rerun "inveniocfg --update-config-py".
> root@uweb1:/opt/invenio# sudo -u www-data ./bin/webcoll -u admin
> -------
> Even if i do this the problem remains,
> so i started this by hand
> #sudo -u www-data ./bin/webcoll -u admin
> Username: admin
> 2012-09-17 20:02:49 --> Task #1 submitted.
>
>
> - run-web-tests :
>
> Cannot do this as i am working from the command-line without gui
>
>
> btw. typing "Yes, i know!" is really annoying if you have to do it 3 times
> e.g. for a drop-demo-site.
>
>
> Despite this i can load the website and even upload documents,
> but then i get this error :
>
> -----------------------------
>>>
>>> 2012-09-01 17:46:08 -> TypeError: rhs is of unknown type <type
>>> 'NoneType'>
>>>>
>>>> User details
>
> agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101
> Firefox/15.0 email: [email protected] group: [] guest: 0 language: en
> login_method: Local nickname: admin
> precached_permitted_restricted_collections: [] precached_useadmin: True
> precached_usealerts: True precached_useapprove: True precached_usebaskets:
> True precached_usegroups: True precached_useloans: True
> precached_usemessages: True precached_usestats: True
> precached_viewsubmissions: False referer: <> remote_host: remote_ip:
> 80.108.69.170 session: 8ea150ceefd8fa11926a32acfc182105 uid: 1 uri:
> </record/1?>
>>>>
>>>> Traceback details
>
> Traceback (most recent call last): File
> "/usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler_wsgi.py",
> line 368, in application ret = invenio_handler(req) File
> "/usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler.py",
> line 334, in _profiler return _handler(req) File
> "/usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler.py",
> line 376, in _handler return root._traverse(req, path, False, guest_p) File
> "/usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler.py",
> line 237, in _traverse result = _check_result(req, obj(req, form)) File
> "/usr/local/lib/python2.7/dist-packages/invenio/websearch_webinterface.py",
> line 452, in __call__ (auth_code, auth_msg) =
> check_user_can_view_record(user_info, self.recid) File
> "/usr/local/lib/python2.7/dist-packages/invenio/search_engine.py", line 285,
> in check_user_can_view_record restricted_collections =
> get_restricted_collections_for_recid(recid) File
> "/usr/local/lib/python2.7/dist-packages/invenio/search_engine.py", line 244,
> in get_restricted_collections_for_recid return [row[0] for row in
> restricted_collections if recid in HitSet(row[1])] File "intbitset.pyx",
> line 267, in lib.intbitset.intbitset.__cinit__ (intbitset.c:2442) File
> "intbitset.pyx", line 264, in lib.intbitset.intbitset.__cinit__
> (intbitset.c:2386) TypeError: rhs is of unknown type <type 'NoneType'>
> Locals by frame, innermost last
>>>>>
>>>>> Frame application in
>>>>> /usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler_wsgi.py
>>>>> at line 385
>
> *******************************************************************************
> 382 else: 383 req.flush() 384 except: ----> 385 register_exception(req=req,
> alert_admin=True) 386 if not req.response_sent_p: 387 req.status =
> HTTP_INTERNAL_SERVER_ERROR 388 req.headers_out['content-type'] = 'text/html'
> *******************************************************************************
> start_response = '<built-in method start_response of mod_wsgi.Adapter object
> at 0x7f58c78e38a0>' environ = "{'mod_wsgi.listener_port': '80',
> 'HTTP_COOKIE': 'INVENIOSESSION=8ea150ceefd8fa11926a32acfc182105',
> 'mod_wsgi.listener_host': '', 'SERVER_SOFTWARE': 'Apache', 'SCRIPT_NAME':
> '', 'mod_wsgi.handler_script': '', 'SERVER_SIGNATURE': '', 'REQUEST_METHOD':
> 'GET', 'PATH_INFO': '/record/1', 'SERVER_PROTOCOL': 'HTTP/1.1',
> 'QUERY_STRING': '', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64;
> rv:15.0) Gecko/20100101 Firefox/15.0', 'HTTP_CONNECTION': 'keep-alive',
> 'SERVER_NAME': 'www.osteopathic-inven [...] req =
> '<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
> 0x7f58c9b6e0d0>' possible_handler = 'None' possible_module = 'None'
>>>>>
>>>>> Frame _profiler in
>>>>> /usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler.py at
>>>>> line 334
>
> *******************************************************************************
> 331 req.write("\n<pre>%s</pre>" % profile_dump) 332 return ret 333 else:
> ----> 334 return _handler(req) 335 336 def _handler(req): 337 """ This
> handler is invoked by mod_python with the apache request."""
> *******************************************************************************
> _handler = '<function _handler at 0x7f58c9b69c08>' args = '{}' req =
> '<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
> 0x7f58c9b6e0d0>'
>>>>>
>>>>> Frame _handler in
>>>>> /usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler.py at
>>>>> line 411
>
> *******************************************************************************
> 408 409 ## as suggested in 410 ##
> <http://www.python.org/doc/2.3.5/lib/module-gc.html> ----> 411 del
> gc.garbage[:] 412 413 return _profiler 414
> *******************************************************************************
> allowed_methods = "('GET', 'POST', 'HEAD', 'OPTIONS')" guest_p = '0' req =
> '<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
> 0x7f58c9b6e0d0>' uri = "'/record/1'" path = "['record', '1']" root =
> '<invenio.webinterface_layout.WebInterfaceInvenio object at 0x7f58c9b64cd0>'
>>>>>
>>>>> Frame _traverse in
>>>>> /usr/local/lib/python2.7/dist-packages/invenio/webinterface_handler.py at
>>>>> line 237
>
> *******************************************************************************
> 234 req.uri not in CFG_NO_LANG_RECOGNITION_URIS: 235 ln =
> get_preferred_user_language(req) 236 form.add_field('ln', ln) ----> 237
> result = _check_result(req, obj(req, form)) 238 return result 239 240 def
> __call__(self, req, form):
> *******************************************************************************
> obj = '<invenio.websearch_webinterface.WebInterfaceRecordPages object at
> 0x7f58c9b6e550>' name = 'None' form = "{'ln': [Field('ln', 'en')]}" ln =
> "'en'" guest_p = '0' req =
> '<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
> 0x7f58c9b6e0d0>' component = "'record'" do_head = 'False' path = '[]' self =
> '<invenio.webinterface_layout.WebInterfaceInvenio object at 0x7f58c9b64cd0>'
>>>>>
>>>>> Frame __call__ in
>>>>> /usr/local/lib/python2.7/dist-packages/invenio/websearch_webinterface.py 
>>>>> at
>>>>> line 452
>
> *******************************************************************************
> 449 pass 450 451 user_info = collect_user_info(req) ----> 452 (auth_code,
> auth_msg) = check_user_can_view_record(user_info, self.recid) 453 454 if
> argd['rg'] > CFG_WEBSEARCH_MAX_RECORDS_IN_GROUPS and not
> isUserSuperAdmin(user_info): 455 argd['rg'] =
> CFG_WEBSEARCH_MAX_RECORDS_IN_GROUPS
> *******************************************************************************
> pref = "{'login_method': 'Local', 'language': 'en'}" uid = '1' form =
> "{'ln': [Field('ln', 'en')]}" self =
> '<invenio.websearch_webinterface.WebInterfaceRecordPages object at
> 0x7f58c9b6e550>' req =
> '<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
> 0x7f58c9b6e0d0>' user_info = "{'uid': 1, 'agent': 'Mozilla/5.0 (Windows NT
> 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0', 'precached_usegroups':
> True, 'session': '8ea150ceefd8fa11926a32acfc182105', 'precached_useadmin':
> True, 'group': [], 'guest': '0', 'precached_viewsubmissions': False,
> 'email': '[email protected]', 'remote_ip': '80.108.69.170',
> 'precached_usestats': True, 'precached_usemessages': True, 'referer': '',
> 'nickname': 'admin', 'login_method': 'Local',
> 'precached_permitted_restricted_collections': [], ' [...] argd = "{'f1': '',
> 'f2': '', 'f3': '', 'op1': '', 'op2': '', 'cc': 'Atlantis Institute of
> Fictive Science', 'ec': [], 'ap': 1, 'tab': '', 'd2': '', 'id': -1, 'd1':
> '', 'd2y': 0, 'sysnb': '', 'jrec': 0, 'ln': 'en', 'sysno': '', 'rg': 10,
> 'm1': '', 'm3': '', 'm2': '', 'd2m': 0, 'd2d': 0, 'action': 'search', 'rm':
> '', 'verbose': 0, 'dt': '', 'p2': '', 'p3': '', 'c': [], 'p1': '', 'so':
> 'd', 'f': '', 'of': 'hb', 'sp': '', 'd1y': 0, 'd1d': 0, 'p': '', 'recid': 1,
> 'aas': 0, 'recidb': -1, 'sc': 0, 'd1m': 0, ' [...]
>>>>>
>>>>> Frame check_user_can_view_record in
>>>>> /usr/local/lib/python2.7/dist-packages/invenio/search_engine.py at line 
>>>>> 285
>
> *******************************************************************************
> 282 authorization is not granted 283 @rtype: (int, string) 284 """ ----> 285
> restricted_collections = get_restricted_collections_for_recid(recid) 286 if
> not restricted_collections or is_user_owner_of_record(user_info, recid): 287
> return (0, '') 288 for collection in restricted_collections:
> *******************************************************************************
> user_info = "{'uid': 1, 'agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64;
> rv:15.0) Gecko/20100101 Firefox/15.0', 'precached_usegroups': True,
> 'session': '8ea150ceefd8fa11926a32acfc182105', 'precached_useadmin': True,
> 'group': [], 'guest': '0', 'precached_viewsubmissions': False, 'email':
> '[email protected]', 'remote_ip': '80.108.69.170',
> 'precached_usestats': True, 'precached_usemessages': True, 'referer': '',
> 'nickname': 'admin', 'login_method': 'Local',
> 'precached_permitted_restricted_collections': [], ' [...] recid = '1'
>>>>>
>>>>> Frame get_restricted_collections_for_recid in
>>>>> /usr/local/lib/python2.7/dist-packages/invenio/search_engine.py at line 
>>>>> 244
>
> *******************************************************************************
> 241 Return the list of restricted collection names to which recid belongs.
> 242 """ 243 restricted_collections = run_sql("""SELECT c.name, c.reclist
> FROM accROLE_accACTION_accARGUMENT raa JOIN accARGUMENT ar ON
> raa.id_accARGUMENT = ar.id JOIN collection c ON ar.value=c.name WHERE
> ar.keyword = 'collection' AND raa.id_accACTION = %s""", (VIEWRESTRCOLL_ID,))
> ----> 244 return [row[0] for row in restricted_collections if recid in
> HitSet(row[1])] 245 246 247 def is_user_owner_of_record(user_info, recid):
> *******************************************************************************
> restricted_collections = "(('Theses', None), ('Theses', None))" recid = '1'
> row = "('Theses', None)"
>>>>>
>>>>> Frame lib.intbitset.intbitset.__cinit__ (intbitset.c:2386) in
>>>>> intbitset.pyx at line 264
>
> __maxelem__ = '2147483647' __revision__ = "'$Id$'" intbitset = "<type
> 'lib.intbitset.intbitset'>" __all__ = "['intbitset']" __builtins__ =
> "<module '__builtin__' (built-in)>" __file__ =
> "'/usr/local/lib/python2.7/dist-packages/invenio/intbitset.so'"
> intbitset_iterator = "<type 'lib.intbitset.intbitset_iterator'>"
> __apilevel__ = '1.03' __package__ = "'invenio'" sys = "<module 'sys'
> (built-in)>" __test__ = '{}' __name__ = "'invenio.intbitset'" array = "<type
> 'array.array'>" zlib = "<module 'zlib' (built-in)>" __doc__ = 'None'
> CFG_INTBITSET_ENABLE_SANITY_CHECKS = 'False' Note that this email was sent
> to you because it has been impossible to log this exception into
> /opt/invenio/var/log/invenio.err
>
>
> -----------------------------------------------------------
>
> Any Ideas what i should try next -
> a complete reinstall ?
>
>
> Nenad
>



-- 
Benoit Thiell
The SAO/NASA Astrophysics Data System
http://adswww.harvard.edu/

Reply via email to