Bug 37227 - Creating report fails
Creating report fails
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.0-x
Assigned To: UMC maintainers
:
Depends on: 34333
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-08 11:46 CET by Florian Best
Modified: 2018-10-09 17:32 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017010221005008, 2017062521000078, 2017071821000277, 2017071821000213
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments
directory reports config.ini (2.17 KB, text/plain)
2015-06-02 11:08 CEST, Michael Grandjean
Details
directory listing reports/default/... (1.11 KB, text/plain)
2015-06-02 11:10 CEST, Michael Grandjean
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-12-08 11:46:41 CET
Seems to still occur in UCS 4.0.

Remark:
Habe versucht einen Report über die angelegten Benutzer zu erstellen.

Version:
4.0-0 errata10 (Walle)

Traceback:
  File "/usr/lib/pymodules/python2.7/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line
184, in wrapper_func
    ret = func( *args, **kwargs )
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line
584, in _thread
    doc = udr.Document( template, header = cfg.get_header( request.flavor,
request.options[ 'report' ] ), footer = cfg.get_footer( request.flavor, request.options[
'report' ] ) )
  File "/usr/lib/pymodules/python2.7/univention/directory/reports/document.py", line 51,
in __init__
    if self._template.endswith( '.tex' ):

AttributeError: 'NoneType' object has no attribute 'endswith'



+++ This bug was initially created as a clone of Bug #34333 +++

We received the following traceback:

  File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 147, in wrapper_func
    ret = func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 546, in _thread
    doc = udr.Document( template, header = cfg.get_header( request.flavor, request.options[ 'report' ] ), footer = cfg.get_footer( request.flavor, request.options[ 'report' ] ) )
  File "/usr/lib/pymodules/python2.6/univention/directory/reports/document.py", line 51, in __init__
    if self._template.endswith( '.tex' ):

AttributeError: 'NoneType' object has no attribute 'endswith'

I could only reproduce this by manipulating a request by hand which has either no flavor or an invalid report format.

umc-command udm/reports/create -f foo/bar -e -o '{"objects":["uid=Administrator,cn=users,dc=ucs,dc=school"],"report":"Foo Report (deosnt exists)"}'

I would say that this is a JavaScript error (a form was sent without all information).

The feedback mail contained this remark: """beobachtetes Ergebnis: dieser Fehler, und dannach muss man im Browser auf zurück klicken, sonst
kommt man nicht mehr weiter."""
Comment 1 Florian Best univentionstaff 2014-12-10 13:00:16 CET
I could reproduce this:
The UCR template /etc/univention/directory/reports/config.ini may consists of
* old entries with 3 columns instead of 4
* pathes which doesn't exist

If this is the case the traceback will occur.

As fix we could show in that case an error message which tells the user that the UCR template /etc/univention/directory/reports/config.ini have to be checked.

(Plus: Instead of replacing the legacy directory-path by an empty string we could use the default directory /etc/univention/directory/reports/default.)
Comment 2 Florian Best univentionstaff 2015-01-13 13:22:27 CET
Reported again, 3.2-3 errata221 (Borgfeld)
Remark:
Erstellen eines csv-Reports der Rechnerobjekte schlägt fehl.
Comment 3 Florian Best univentionstaff 2015-04-16 16:33:50 CEST
Reported again, 4.0-1 errata152 (Walle)
Comment 4 Florian Best univentionstaff 2015-05-28 12:20:47 CEST
Reported again, 4.0-2 errata194 (Walle)
Remark:
Erstellen von AD Report als CSV


→ What is a AD report?
Comment 5 Florian Best univentionstaff 2015-06-01 16:42:13 CEST
Reported again, 4.0-2 errata205 (Walle)

Die Ausführung des Kommandos udm/reports/create users/user ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 207, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 163, in _decorated
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 146, in wrapper_func
    return _func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in _func
    ret = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 601, in _thread
    doc = udr.Document(template, header=cfg.get_header(request.flavor, request.options['report']), footer=cfg.get_footer(request.flavor, request.options['report']))
  File "%PY2.7%/univention/directory/reports/document.py", line 51, in __init__
    if self._template.endswith( '.tex' ):
AttributeError: 'NoneType' object has no attribute 'endswith'
Comment 6 Michael Grandjean univentionstaff 2015-06-01 19:50:05 CEST
(In reply to Florian Best from comment #5)
> Reported again, 4.0-2 errata205 (Walle)

Was this reported today? It might have been one of the training systems we used today in munich. We had this exact traceback on 2 out of 6 newly installed systems (installed with the UCS 4.0-2 DVD).
Maybe I can track this down tomorrow, but won't have that much time. Any suggestions?
Comment 7 Florian Best univentionstaff 2015-06-01 21:01:51 CEST
(In reply to Michael Grandjean from comment #6)
> (In reply to Florian Best from comment #5)
> > Reported again, 4.0-2 errata205 (Walle)
> 
> Was this reported today? It might have been one of the training systems we
> used today in munich. We had this exact traceback on 2 out of 6 newly
> installed systems (installed with the UCS 4.0-2 DVD).
> Maybe I can track this down tomorrow, but won't have that much time. Any
> suggestions?
Please attach /etc/univention/directory/reports/config.ini and check if the pathes which are referenced there exists.
Comment 8 Michael Grandjean univentionstaff 2015-06-02 11:08:13 CEST
Created attachment 6935 [details]
directory reports config.ini

This is the config.ini
I will also attach a directory listing.

Strangely enough, I was able to create a report using the command line tool:

> root@ucs-4169:~# univention-directory-reports -m users/user uid=Administrator,cn=users,$(ucr get ldap/base) -u uid=Administrator,cn=users,$(ucr get ldap/base) -p univention
> created PDF file: /tmp/univention-directory-reports-naGR31.pdf
> root@ucs-4169:~#

But using the UMC still failed with the above traceback.
Comment 9 Michael Grandjean univentionstaff 2015-06-02 11:10:19 CEST
Created attachment 6936 [details]
directory listing reports/default/...
Comment 10 Florian Best univentionstaff 2015-06-08 11:17:51 CEST
Reported again, 4.0-2 errata205 (Walle)
Reported again, 4.0-1 errata193 (Walle)

Remark:
Occurs when creating a CSV report of DC Master.
Comment 11 Florian Best univentionstaff 2016-01-22 10:42:21 CET
Reported again, 4.1-0 errata59 (Vahr)
Comment 12 Florian Best univentionstaff 2016-08-15 15:53:24 CEST
Reported again,
Version: 4.1-2 errata220 (Vahr)

Remark: Guten Tag
Wollte einen Report der Gruppen estellen. Geht aber nicht.
Comment 13 Florian Best univentionstaff 2016-08-22 11:40:18 CEST
Reported again, 4.1-1 errata140 (Vahr)
Comment 14 Florian Best univentionstaff 2017-01-05 13:35:24 CET
Reported again, 4.1-4 errata366 (Vahr)
Comment 15 Florian Best univentionstaff 2017-06-27 10:17:12 CEST
Reported again, 4.1-4 errata430 (Vahr)

Remark: Can't log in my owncloud account. Even after resetting the password numerous times.
Comment 16 Florian Best univentionstaff 2017-07-21 12:04:25 CEST
Reported again, 4.1-4 errata429 (Vahr)
Comment 17 Florian Best univentionstaff 2017-07-21 12:04:47 CEST
Reported again, 4.1-4 errata371 (Vahr)
Comment 18 Philipp Hahn univentionstaff 2018-10-09 17:32:39 CEST
UDM uses a new report generator since <http://errata.software-univention.de/ucs/4.2/76.html> and UCS-4.1 is out-of-maintenance.