Hello to all and Happy new year!

I've installed 0.99.90.20091222 and, in general, it seems to be working pretty well :) Having said that, I'm getting the following exception when trying to access Admin Area->Websubmit->(any doc type)->(Any Action), View Interface. (ie admin/websubmit/websubmitadmin.py/doctypeconfigure?doctype=DEMOART -> SBI -> view interface).

Can you reproduce it? I cannot understand if it's related to a custom page/webfunction/etc that's missing, or is a generic error that may appear in all installations.

Also, I found in the changelog the following excerpt, that might be relevant:
2007-03-20  Nicholas Robinson <[email protected]>
* modules/websubmit/lib/websubmit_engine.py: Bug Fix: If a
WebSubmit function returns a NoneType (or indeed a non-string), it
no longer causes a TypeError due to concatenation of strings with
non-strings when creating page containing the output of functions.
NoneTypes returned by functions are now replaced with an empty
string, and all other return values are casted to a strings;

(FYI, pagenb from sbmFIELD in the DB is always a number, not null and the pages were displaying properly in 0.99.1)

Any ideas?

I've made the following modification near
line 4035 of /usr/lib/python2.6/site-packages/invenio/websubmitadmin_engine.py", and it seems to be working, but I'm not sure if it should stay this way...

    try:
        pagenum = int(pagenum)
    except ValueError:
        pagenum = ""
+    except TypeError:
+        pagenum = ""


Best regards,
Theodoropoulos Theodoros
----------
The following problem occurred on <http://invenio1.lib.auth.gr> (CDS
Invenio 0.99.90.20091222)

>>> Registered exception
2009-12-28 11:34:17 -> TypeError: int() argument must be a string or a
number, not 'NoneType'

>>> User details
                                     agent: Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET
CLR 3.5.30729)
                              apache_group: []
                               apache_user: None
                                     email: [email protected]
                                     group: ['IKEE']
                                     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: True
                                   referer:
<http://invenio1.lib.auth.gr/admin/websubmit/websubmitadmin.py/doctypeconfigure?doctype=DEMOPIC>
                               remote_host:
                                 remote_ip: 155.207.48.160
                                   session:
d8fde3812e4eaf2607dd837a899356ea
                                       uid: 1
                                       uri:
</admin/websubmit/websubmitadmin.py/doctypeconfiguresubmissionpages?doctype=DEMOPIC&action=SBI&viewSubmissionInterface=view+interface>

>>> Traceback details
Forced traceback (most recent call last):
Traceback (most recent call last):
  File
"/usr/lib/python2.6/site-packages/invenio/webinterface_handler_wsgi.py",
line 343, in application
    mp_legacy_publisher(req, possible_module, possible_handler)
  File
"/usr/lib/python2.6/site-packages/invenio/webinterface_handler_wsgi.py",
line 445, in mp_legacy_publisher
    return _check_result(req, module_globals[possible_handler](req,
**cleaned_form))
  File "<string>", line 679, in doctypeconfiguresubmissionpages
  File
"/usr/lib/python2.6/site-packages/invenio/websubmitadmin_engine.py",
line 4035, in perform_request_configure_doctype_submissionpages
    pagenum = int(pagenum)
TypeError: int() argument must be a string or a number, not 'NoneType'

Local variables:
  environ = {'mod_wsgi.reload_mechanism': '1',
'mod_wsgi.listener_port': '80', 'HTTP_REFERER':
'http://invenio1.lib.auth.gr/admin/websubmit/websubmitadmin.py/doctypeconfigure?doctype=DEMOPIC',
'mod_wsgi.listener_host': '', 'SERVER_SOFTWARE': 'Apache',
'SCRIPT_NAME': '', 'SERVER_SIGNATURE': '', 'REQUEST_METHOD': 'GET',
'HTTP_KEEP_ALIVE': '300', 'SERVER_PROTOCOL': 'HTTP/1.1', 'QUERY_STRING':
'doctype=DEMOPIC&action=SBI&viewSubmissionInterface=view+interface',
'PATH': '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/ [...]
  possible_handler = 'doctypeconfiguresubmissionpages'
  possible_module =
'/opt/cds-invenio/var/www/admin/websubmit/websubmitadmin.py'
  req = <invenio.webinterface_handler_wsgi.SimulatedModPythonRequest
object at 0x92cdcac>
  start_response = <built-in method start_response of mod_wsgi.Adapter
object at 0x92bdda0>

Reply via email to